5.1.5 • Published 6 years ago

@styled-system/should-forward-prop v5.1.5

Weekly downloads
183,937
License
MIT
Repository
-
Last release
6 years ago

@styled-system/should-forward-prop

Utility for filtering Styled System props with Emotion's shouldForwardProp option

npm i @styled-system/should-forward-prop
import styled from '@emotion/styled'
import {
  space,
  color,
  typography
} from 'styled-system'
import shouldForwardProp from '@styled-system/should-forward-prop'

const Box = styled('div', { shouldForwardProp })(
  space,
  color,
  typography
)

Custom Props

To exclude other custom props not included in Styled System, use the createShouldForwardProp utility.

import styled from '@emotion/styled'
import { space, color } from 'styled-system'
import { createShouldForwardProp, props } from '@styled-system/should-forward-prop'

const shouldForwardProp = createShouldForwardProp([
  ...props,
  'd',
  'x'
])

const Box = styled('div', {
  shouldForwardProp
})(props => ({
  display: props.d,
  fontWeight: props.x ? 'bold' : null,
}),
  space,
  color
)

MIT License

zewide@3wirebuild/styled-system@cocoon-ui/box@cocoon-ui/core@linktr.ee/ui-link-kit@waves.exchange/waves-signer@komfy/reflexbox@galley-eng/pricing-calculatormy-test-vimal-componentsvtest-cmp@gassan/gassan-uifreemium-ui-trial@pomona/goods-coreicomera-react-library@cloudie/dropletssui-gatsby@lotter-system/core@coreym/benchmark@fxtrot/edge@testing-ui/core@everything-registry/sub-chunk-878superlib-reactventura-uilayout-kit-reacthybrid-componentsma-hab-test-design-system@waves/storage-provider@waves.exchange/storage-provider@twilio-paste/styling-library@ultron.foundation/uikit@tillen/fresco@theme-ui/components@vashafarisi/react@veriphi/veto-ui@yonyangtangtang/uikit@zalastax/nolb-_sty@tedconf/monterey@zilt/forge-uiantd-styledaresswapcaresswapcuikitanton-uigatsby-theme-gatsbyjs-websitechefphilip-test-uikitcomposite-uiconnect-uikitchaser-componentschakra-uidcs-uikitblade-uicabins-uiboinastyled-uistinodes-uiui-bagtest-bcc-design-systemminerva-uiorcs-design-systemreflexboxreact-flex-primitivereact-grid-primitivepouncejsrebassedproposify-design-systemreact-responsive-videoreact-primitives-boxsharply-kitskara-react@egoist/chakra-ui@effable/react@envio-ui/react@envio-ui/helpers@ethers-react/ui@eyeem-ui/atoms@evilfactory/anggun@evilfactory/anggun-core@hygraph/baukasten@iguanadex/uikit@hitagi/core@hitagi/dota@gitq/gitq-icons@gitq/icons@gatsbyjs/gatsby-theme-website@jkitcen/uikit@ke.wallet/provider-ke-wallet-ui@kodiak-ui/core@komfy-social/reflexbox@talves/react-isolated-theme-ui@syvita/ui@syvita/ui-core@obigtech/ui@obigtech/ui-core@ntragas/pouncejstest@lidofinance/styled-system@liinkiing/klee@looker/design-tokens@taskanalytics/genus@laito/box@laito/image@laito/text
5.1.5

6 years ago

5.1.4

6 years ago

5.1.2

6 years ago

5.1.1

6 years ago

5.1.0

6 years ago

5.0.23

6 years ago

5.0.21

6 years ago

5.0.20

6 years ago

5.0.18

6 years ago

5.0.16

6 years ago

5.0.15

6 years ago

5.0.14

6 years ago

5.0.12

6 years ago

5.0.10

7 years ago

5.0.7

7 years ago

5.0.6

7 years ago

5.0.5

7 years ago

5.0.4

7 years ago

5.0.3

7 years ago

5.0.2

7 years ago

5.0.1

7 years ago

5.0.0

7 years ago

5.0.0-12

7 years ago

5.0.0-11

7 years ago

1.0.0

7 years ago