import React from 'react'; export type styledTags = React.ElementType; // tsFix: what types are returned by emotion' css`` template literal function? Interpolation | SerializedStyles type cssReturnType = any | null | undefined; export type ssProp = | string | ((props) => string) | Array string)> | cssReturnType; export type uniqueStyleProps = {}; /** * Props used by this UI library */ export type styleProps = { /** * Some components check the `props.variant` and apply a different style (Button), or render differently arranged markup (Grid4TitleTextImage), or perform different logic. */ variant?: string; /** * Refers to [data-textcolor] groups you defined in your global css file. Import: @techytools/ui/styles/colors.css */ textcolor?: string; /** * Refers to [data-bgcolor] groups you defined in your global css file. Import: @techytools/ui/styles/colors.css */ bgcolor?: string; /** * Pass true to use the current textcolor, but as a gradient. Or specify any textcolor set in @techytools/ui/styles/colors.css */ textgradient?: string | boolean; /** * Pass true to use the current bgcolor, but as a gradient. Or specify any bgcolor set in @techytools/ui/styles/colors.css */ bggradient?: string | boolean; /** * SCSS as a simple string type. Or pass a function that accepts props and returns a string if you want to refer to any component props, or your site's theme. Or array of either. Same for other ssXxx props below. */ ss?: ssProp; /** * `@media (min-width: 931px)` - Does not target any specific device. Mostly desktop, some tablets. 931px is an arbitrary number. It's just the minimum width where desktop designs look good. Below this it's very hard to fit all the desktop content. Same as `theme.mq.lg`. */ ssLg?: ssProp; /** * `@media (max-width: 930px)` - Does not target any specific device. Some desktop, some tablets, but mostly phones. This complements ssLg. Same as `theme.mq.sm`. */ ssSm?: ssProp; /** * `@media (min-width: 1025px)` - Desktop, Laptop, iPad 12in Landscape. Use in conjunction with ssMobile which is <= 1024px. Same as `theme.mq.desktop`. */ ssDesktop?: ssProp; /** * `@media (max-width: 1024px)` - Mobile, Tablet, iPad 12in Portrait, iPad 9in in any orientation. Use in conjunction with ssDesktop which is >= 1025px. Same as `theme.mq.mobile`. */ ssMobile?: ssProp; /** * phones only, not tablets ( <= 499px wide ) Same as `theme.mq.phone`. */ ssPhone?: ssProp; /** * extra narrow devices like iPhone 8/X/SE ( <= 399px wide ) Same as `theme.mq.smallPhone`. */ ssSmallPhone?: ssProp; /** * includes iPad-12 portrait and iPad-9 landscape or portrait ( >= 737px wide, <= 1024px wide ) Same as `theme.mq.tablet`. */ ssTablet?: ssProp; /** * the very awkward size where we no longer support the mobile design, but it feels big enough to maybe be desktop ( >= 931px wide, <= 1024px wide ) Same as `theme.mq.largeTablet`. */ ssLargeTablet?: ssProp; /** * everything >= 500px wide. Same as `theme.mq.notPhone`. */ ssNotPhone?: ssProp; /** * <= 359px wide. Same as `theme.mq.tinyPhone`. */ ssTinyPhone?: ssProp; /** * \>= 1440px wide. Same as `theme.mq.largeDesktop`. */ ssLargeDesktop?: ssProp; /** * \>= 1920px wide. Same as `theme.mq.veryLargeDesktop`. */ ssVeryLargeDesktop?: ssProp; /** * Portrait orientation (height > width). Same as `theme.mq.portrait`. */ ssPortrait?: ssProp; /** * Landscape orientation (width > height). Same as `theme.mq.landscape`. */ ssLandscape?: ssProp; /** * applies to all sizes and devices, like ss, but this is wrapped inside a media query, to force-add specificity. Same as `theme.mq.all`. */ ssAll?: ssProp; /** * The name of the component. Unique per component. Will be added to className. When looking in the browser Dev Tools, know which div was generated by which component. */ componentName?: string; className?: string; /** * Your site theme is injected into component props by `hooks/withStyles.tsx`. You can read props by passing style as a function instead of a string/object: * ``` `padding: 1rem ${props.theme.card.paddingX} 2rem`} />```. */ theme?: Record; }; export default styleProps;