-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85ede85
commit a34d190
Showing
3 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
apps/site/src/components/code/components/live-code/live-code.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { tv } from 'tailwind-variants'; | ||
|
||
export const styles = tv( | ||
{ | ||
slots: { | ||
base: 'max-w-5xl overflow-hidden rounded-md border border-muted-50 bg-white p-4 pb-0', | ||
displayWrapper: 'relative -mx-4 -mt-4 border-muted-50 p-4', | ||
error: 'flex gap-2 rounded-md bg-danger-10 p-2 text-danger-90', | ||
buttonWrapper: 'absolute right-0 top-0 flex items-center justify-center rounded bg-white/50', | ||
codeWrapper: 'relative -mx-4 border-t border-muted-50', | ||
copyCodeButton: | ||
'typography-body-10 absolute right-0 top-0 p-1 pr-2 text-white opacity-50 transition-opacity hover:opacity-100', | ||
}, | ||
variants: { | ||
isCodeVisible: { | ||
true: { | ||
codeWrapper: 'hidden', | ||
}, | ||
false: { | ||
codeWrapper: 'block', | ||
}, | ||
}, | ||
type: { | ||
inline: { | ||
base: 'items-baseline text-link', | ||
iconBefore: 'self-center', | ||
iconAfter: 'self-center', | ||
}, | ||
standalone: { | ||
base: 'items-center text-text', | ||
}, | ||
}, | ||
underline: { | ||
true: '', | ||
}, | ||
isFocusVisible: { | ||
true: { base: 'focus-outline' }, | ||
false: { base: 'outline-none' }, | ||
}, | ||
}, | ||
compoundSlots: [ | ||
{ | ||
slots: ['base'], | ||
type: 'inline', | ||
underline: true, | ||
className: 'underline hover:no-underline', | ||
}, | ||
], | ||
}, | ||
{ responsiveVariants: ['xsl', 'sm', 'md', 'lg', 'xl'] }, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters