Rationalize frosted badge
This commit is contained in:
parent
5abc8b4d3b
commit
bf59f0aa09
@ -13,7 +13,7 @@ export default function Badge({
|
|||||||
className?: string
|
className?: string
|
||||||
type?: 'large' | 'small' | 'text-only'
|
type?: 'large' | 'small' | 'text-only'
|
||||||
dimContent?: boolean
|
dimContent?: boolean
|
||||||
contrast?: 'low' | 'medium' | 'high' | 'frost'
|
contrast?: 'low' | 'medium' | 'high' | 'frosted'
|
||||||
uppercase?: boolean
|
uppercase?: boolean
|
||||||
interactive?: boolean
|
interactive?: boolean
|
||||||
}) {
|
}) {
|
||||||
@ -32,7 +32,7 @@ export default function Badge({
|
|||||||
'text-[0.7rem] font-medium rounded-[0.25rem]',
|
'text-[0.7rem] font-medium rounded-[0.25rem]',
|
||||||
contrast === 'high'
|
contrast === 'high'
|
||||||
? 'text-invert bg-invert'
|
? 'text-invert bg-invert'
|
||||||
: contrast === 'frost'
|
: contrast === 'frosted'
|
||||||
? 'text-black bg-white/30'
|
? 'text-black bg-white/30'
|
||||||
: 'text-medium bg-gray-300/30 dark:bg-gray-700/50',
|
: 'text-medium bg-gray-300/30 dark:bg-gray-700/50',
|
||||||
interactive && (contrast === 'high'
|
interactive && (contrast === 'high'
|
||||||
|
|||||||
@ -81,7 +81,7 @@ export default function PhotoRecipe({
|
|||||||
)}>
|
)}>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<PhotoFilmSimulation
|
<PhotoFilmSimulation
|
||||||
contrast="frost"
|
contrast="frosted"
|
||||||
className="grow"
|
className="grow"
|
||||||
simulation={simulation}
|
simulation={simulation}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -40,7 +40,10 @@ export default function PhotoFilmSimulation({
|
|||||||
label={medium}
|
label={medium}
|
||||||
labelSmall={small}
|
labelSmall={small}
|
||||||
href={pathForFilmSimulation(simulation)}
|
href={pathForFilmSimulation(simulation)}
|
||||||
icon={<PhotoFilmSimulationIcon simulation={simulation} />}
|
icon={<PhotoFilmSimulationIcon
|
||||||
|
simulation={simulation}
|
||||||
|
className={clsx(contrast === 'frosted' && 'text-dark')}
|
||||||
|
/>}
|
||||||
title={`Film Simulation: ${large}`}
|
title={`Film Simulation: ${large}`}
|
||||||
type={type}
|
type={type}
|
||||||
badged={badged}
|
badged={badged}
|
||||||
|
|||||||
12
tailwind.css
12
tailwind.css
@ -86,14 +86,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Text Primitives */
|
||||||
|
@utility text-dark {
|
||||||
|
@apply text-gray-900
|
||||||
|
}
|
||||||
|
@utility text-light {
|
||||||
|
@apply text-gray-100
|
||||||
|
}
|
||||||
|
|
||||||
/* Text */
|
/* Text */
|
||||||
@utility text-main {
|
@utility text-main {
|
||||||
@apply
|
@apply
|
||||||
text-gray-900 dark:text-gray-100
|
text-dark dark:text-light
|
||||||
}
|
}
|
||||||
@utility text-invert {
|
@utility text-invert {
|
||||||
@apply
|
@apply
|
||||||
text-white dark:text-black
|
text-light dark:text-dark
|
||||||
}
|
}
|
||||||
@utility text-medium {
|
@utility text-medium {
|
||||||
@apply
|
@apply
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user