import { PropsWithChildren } from 'react'
import { color, space, variant, SpaceProps } from 'styled-system'
import { styled } from '@styled-components'
import { cssClass } from '../../utils/css-class.js'
import { NewColorProps as ColorProps } from '../../utils/color-props.js'
const sizeVariants = variant({
prop: 'size',
variants: {
sm: {
fontSize: 'xs',
py: 'sm',
},
lg: {
fontSize: 'default',
},
},
})
const variants = variant({
variants: {
primary: {
color: 'primary100',
},
danger: {
color: 'error',
},
success: {
color: 'success',
},
info: {
color: 'primary60',
},
secondary: {
color: 'accent',
},
},
})
/**
* Prop Types of a Link component.
* Apart from those explicitly specified below it extends all {@link ColorProps},
* and {@link SpaceProps}
*
* @memberof Link
* @alias LinkProps
* @property {string} [...] All props default to _a_ html component like `href`,
* `onClick` etc.
* @property {string} [...] Other props from {@link ColorProps} and {@link SpaceProps}
*/
export type LinkProps = ColorProps & SpaceProps & {
/** Defines if link should be uppercase */
uppercase?: boolean;
/** Color variant */
variant?: 'primary' | 'danger' | 'success' | 'info' | 'secondary';
/** Size variant */
size?: 'sm' | 'lg';
} & PropsWithChildren
/**
* @classdesc
*
*
*
* Styled form of Link element.
*
* ### Usage
*
* ```javascript
* import { Link, LinkProps } from '@adminjs/design-system'
* ```
*
* @component
* @subcategory Atoms
* @see LinkProps
* @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-link--default Storybook}
* @hideconstructor
* @example