javascript - How do I remove custom props from a Rebass element extended with styled-components? -


i want create reusable "iconbutton" using styled-components extend rebass button, i'm getting warning:

unknown props 'small, 'overlay' on <button> tag. remove these props element

how remove these props element?

export default ({   ...props,   type,   action,   top,   small,   overlay }) =>   <iconbutton     onclick={() => action()}     px={3}     mt={top && 2}     small={small}     overlay={overlay}>     {icons[type]()}   </iconbutton>;  const iconbutton = styled(button)`   background: ${({ overlay }) => (overlay ? "white" : "transparent")};   svg {     height: ${props =>       props.small ? props.theme.fontsizes[4] : props.theme.fontsizes[5]}px;     width: ${props => props.theme.fontsizes[5]}px;   } `; 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -