styled-css

1.1.0 • Public • Published

styled-css

This package simply exports a tagged template literal to use styled-components like css syntax for react native inline styles.

For example:

import styled from 'styled-components/native';
import css from 'styled-css/native';
 
const Wrapper = styled.ScrollView.attrs((p) => ({
  contentContainerStyle: css`
    align-items: center;
    justify-content: center;
    padding-top: ${p.theme.margin}px;
  `,
}))`
  flex: 1;
  background-color: ${(p) => p.theme.colors.background};
`;

Readme

Keywords

none

Package Sidebar

Install

npm i styled-css

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

86.4 kB

Total Files

7

Last publish

Collaborators

  • mrloh