Skip to content

Commit

Permalink
fix: try support styled button
Browse files Browse the repository at this point in the history
  • Loading branch information
yue4u committed Jan 27, 2025
1 parent 7fbc8e3 commit 13eda38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .storybook/src/v4.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const StyledButtonA = styled(Button<'a'>)``
<StyledButtonA component="a" href="#" />
```

その他のケースは [packages/styled/src/styledButtonType.d.tsx](https://github.com/pixiv/charcoal/blob/main/packages/styled/src/styledButtonType.d.tsx) を参考してください。
その他のケースは [styledButtonTypeTest.d.tsx](https://github.com/pixiv/charcoal/blob/main/packages/react/src/components/Button/styledButtonTypeTest.d.tsx) を参考してください。

## Checkbox

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// This file is for type testing only

// only use the type
import type { default as ButtonType } from '../../react/src/components/Button/index'
import styled from 'styled-components'
import type { default as ButtonType } from './index'
import type styledType from 'styled-components'

declare const Button: typeof ButtonType
declare const styled: typeof styledType

const Custom = ({ custom }: { custom: string }) => <>{custom}</>
const CustomGeneric = <C extends string>({ custom }: { custom: C }) => (
Expand Down

0 comments on commit 13eda38

Please sign in to comment.