Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron authored May 6, 2024
1 parent da7d5b0 commit d9925d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,20 @@ return (
<p class="a">A</p>
<p class="a b">B</p>
```
It also supports client components, taking Next.js’s `Link` as an example:
```tsx
'use client'

import styled from '@master/styled.react';
import Link from 'next/link';

const Button = styled(Link)`inline-flex text:center`

return (
<Button>Submit</Button>
)
```
> ⚠️ If the extended target contains client components, the `'use client'` directive is required.
### Change an element's tag name
Changing the original tag name of an element, such as `<button>` to `<a>`. Left empty '' even if there are no additional classes.
Expand Down

0 comments on commit d9925d8

Please sign in to comment.