Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for greater consistency with styled API #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ For those that want something a bit more like styled-components or emotion, ther
```js
import styled, { css } from 'astroturf';

const Button = styled('button')`
const Button = styled.button`
color: black;
border: 1px solid black;
background-color: white;
Expand Down Expand Up @@ -186,7 +186,7 @@ const helpers = css`
}
`;

const Title = styled('h3')`
const Title = styled.h3`
composes: heavy from './Button-helpers.css';

font-size: 12%;
Expand All @@ -206,7 +206,7 @@ and then:

```js
// Button.js
const Title = styled('h3')`
const Title = styled.h3`
@import './mixins.scss';

@include heavy();
Expand All @@ -222,7 +222,7 @@ very convenient. Astroturf ofters two ways to do this, the first is string inter
```js
const DURATION = 500;

const ColorTransition = styled('nav')`
const ColorTransition = styled.nav`
color: red;
transition: color ${DURATION}ms;

Expand Down Expand Up @@ -300,7 +300,7 @@ With [postcss-nested](https://github.com/postcss/postcss-nested) you can
add keyframes to specific component (and keyframes name will not be global):

```js
const Loader = styled('div')`
const Loader = styled.div`
animation-name: rotation;
animation-duration: 1s;
animation-timing-function: linear;
Expand All @@ -324,7 +324,7 @@ It can also be useful to create components with props already applied, like the
import styled from 'astroturf';
import withProps from 'recompose/withProps';

const PasswordInput = withProps({ type: 'password' })(styled('input')`
const PasswordInput = withProps({ type: 'password' })(styled.input`
background-color: #ccc;
`);
```
Expand All @@ -334,7 +334,7 @@ const PasswordInput = withProps({ type: 'password' })(styled('input')`
`astroturf` supports the `as` prop to control the underlying element type at runtime.

```js
const Button styled('button')`
const Button styled.button`
color: red;
`

Expand Down