|
1 | | -import React, {useState, forwardRef} from 'react' |
2 | | -import {Button, ButtonProps, IconButton, LinkButton} from '.' |
3 | | -import {BaseStyles, ThemeProvider} from '..' |
| 1 | +import {EyeClosedIcon, EyeIcon, SearchIcon, TriangleDownIcon, XIcon} from '@primer/octicons-react' |
4 | 2 | import {Meta} from '@storybook/react' |
5 | | -import {XIcon, SearchIcon, EyeIcon, EyeClosedIcon, TriangleDownIcon, TriangleRightIcon} from '@primer/octicons-react' |
| 3 | +import React, {useState} from 'react' |
| 4 | +import {Button, ButtonProps, IconButton} from '.' |
| 5 | +import {BaseStyles, ThemeProvider} from '..' |
6 | 6 | import Box from '../Box' |
7 | 7 |
|
8 | 8 | export default { |
@@ -186,52 +186,52 @@ export const disabledButton = ({...args}: ButtonProps) => { |
186 | 186 | ) |
187 | 187 | } |
188 | 188 |
|
189 | | -type ReactRouterLikeLinkProps = {to: string; children: React.ReactNode} |
190 | | -const ReactRouterLikeLink = forwardRef<HTMLAnchorElement, ReactRouterLikeLinkProps>( |
191 | | - ({to, ...props}: {to: string; children: React.ReactNode}, ref) => { |
192 | | - // eslint-disable-next-line jsx-a11y/anchor-has-content |
193 | | - return <a ref={ref} href={to} {...props} /> |
194 | | - } |
195 | | -) |
| 189 | +// type ReactRouterLikeLinkProps = {to: string; children: React.ReactNode} |
| 190 | +// const ReactRouterLikeLink = forwardRef<HTMLAnchorElement, ReactRouterLikeLinkProps>( |
| 191 | +// ({to, ...props}: {to: string; children: React.ReactNode}, ref) => { |
| 192 | +// // eslint-disable-next-line jsx-a11y/anchor-has-content |
| 193 | +// return <a ref={ref} href={to} {...props} /> |
| 194 | +// } |
| 195 | +// ) |
196 | 196 |
|
197 | | -export const linkButton = ({...args}: ButtonProps) => { |
198 | | - return ( |
199 | | - <> |
200 | | - <Box mb={2} display="flex"> |
201 | | - <LinkButton href="https://primer.style/" {...args}> |
202 | | - Link to Primer |
203 | | - </LinkButton> |
204 | | - </Box> |
205 | | - <Box mb={2} display="flex"> |
206 | | - <LinkButton href="https://primer.style/" variant="danger" {...args}> |
207 | | - Link to Primer |
208 | | - </LinkButton> |
209 | | - </Box> |
210 | | - <Box mb={2} display="flex"> |
211 | | - <LinkButton href="https://primer.style/" variant="primary" {...args}> |
212 | | - Link to Primer |
213 | | - </LinkButton> |
214 | | - </Box> |
215 | | - <Box mb={2} display="flex"> |
216 | | - <LinkButton href="https://primer.style/" variant="outline" {...args}> |
217 | | - Link to Primer |
218 | | - </LinkButton> |
219 | | - </Box> |
220 | | - <Box mb={2} display="flex"> |
221 | | - <LinkButton href="https://primer.style/" variant="invisible" {...args}> |
222 | | - Link to Primer |
223 | | - </LinkButton> |
224 | | - </Box> |
225 | | - <Box mb={2} display="flex"> |
226 | | - <LinkButton href="https://primer.style/" variant="primary" trailingIcon={TriangleRightIcon} {...args}> |
227 | | - Link to Primer |
228 | | - </LinkButton> |
229 | | - </Box> |
230 | | - <Box mb={2} display="flex"> |
231 | | - <LinkButton to="/dummy" as={ReactRouterLikeLink} variant="primary" trailingIcon={TriangleRightIcon} {...args}> |
232 | | - Link to Primer |
233 | | - </LinkButton> |
234 | | - </Box> |
235 | | - </> |
236 | | - ) |
237 | | -} |
| 197 | +// export const linkButton = ({...args}: ButtonProps) => { |
| 198 | +// return ( |
| 199 | +// <> |
| 200 | +// <Box mb={2} display="flex"> |
| 201 | +// <LinkButton href="https://primer.style/" {...args}> |
| 202 | +// Link to Primer |
| 203 | +// </LinkButton> |
| 204 | +// </Box> |
| 205 | +// <Box mb={2} display="flex"> |
| 206 | +// <LinkButton href="https://primer.style/" variant="danger" {...args}> |
| 207 | +// Link to Primer |
| 208 | +// </LinkButton> |
| 209 | +// </Box> |
| 210 | +// <Box mb={2} display="flex"> |
| 211 | +// <LinkButton href="https://primer.style/" variant="primary" {...args}> |
| 212 | +// Link to Primer |
| 213 | +// </LinkButton> |
| 214 | +// </Box> |
| 215 | +// <Box mb={2} display="flex"> |
| 216 | +// <LinkButton href="https://primer.style/" variant="outline" {...args}> |
| 217 | +// Link to Primer |
| 218 | +// </LinkButton> |
| 219 | +// </Box> |
| 220 | +// <Box mb={2} display="flex"> |
| 221 | +// <LinkButton href="https://primer.style/" variant="invisible" {...args}> |
| 222 | +// Link to Primer |
| 223 | +// </LinkButton> |
| 224 | +// </Box> |
| 225 | +// <Box mb={2} display="flex"> |
| 226 | +// <LinkButton href="https://primer.style/" variant="primary" trailingIcon={TriangleRightIcon} {...args}> |
| 227 | +// Link to Primer |
| 228 | +// </LinkButton> |
| 229 | +// </Box> |
| 230 | +// <Box mb={2} display="flex"> |
| 231 | +// <LinkButton to="/dummy" as={ReactRouterLikeLink} variant="primary" trailingIcon={TriangleRightIcon} {...args}> |
| 232 | +// Link to Primer |
| 233 | +// </LinkButton> |
| 234 | +// </Box> |
| 235 | +// </> |
| 236 | +// ) |
| 237 | +// } |
0 commit comments