mirror of
https://github.com/dzeiocom/components.git
synced 2025-06-07 16:49:55 +00:00
fix: Missing color on Popup
Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
parent
f213ec4f09
commit
43b6d64bfe
@ -68,6 +68,13 @@
|
|||||||
margin 0
|
margin 0
|
||||||
margin-top 8px
|
margin-top 8px
|
||||||
|
|
||||||
|
@media (max-width $mobile)
|
||||||
|
&.mobileBlock
|
||||||
|
display flex
|
||||||
|
width 100%
|
||||||
|
margin 0
|
||||||
|
margin-top 8px
|
||||||
|
|
||||||
&.large
|
&.large
|
||||||
padding 15px 30px
|
padding 15px 30px
|
||||||
font-size rem(20)
|
font-size rem(20)
|
||||||
@ -87,15 +94,11 @@
|
|||||||
|
|
||||||
&:disabled
|
&:disabled
|
||||||
background nativeRGB(var(--gray-500))
|
background nativeRGB(var(--gray-500))
|
||||||
color nativeRGB(var(--gray-500))
|
color nativeRGB(var(--gray-500--text))
|
||||||
transform none
|
transform none
|
||||||
box-shadow none
|
box-shadow none
|
||||||
cursor initial
|
cursor initial
|
||||||
|
|
||||||
@media (prefers-color-scheme dark)
|
|
||||||
background $lightGrayDark
|
|
||||||
color $darkGrayDark
|
|
||||||
|
|
||||||
&.outline
|
&.outline
|
||||||
border 2px solid nativeRGB(var(--gray-500))
|
border 2px solid nativeRGB(var(--gray-500))
|
||||||
background transparent
|
background transparent
|
||||||
|
@ -13,9 +13,9 @@ export const Button = (args: any) => <Box><Component {...args}>Button</Component
|
|||||||
Button.args = {
|
Button.args = {
|
||||||
nomargintop: true,
|
nomargintop: true,
|
||||||
icon: Zap,
|
icon: Zap,
|
||||||
|
mobileBlock: true,
|
||||||
iconLeft: Zap,
|
iconLeft: Zap,
|
||||||
size: 'small',
|
size: 'small'
|
||||||
block: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WithImg = (args: any) => <Box><Component {...args}>Button</Component></Box>
|
export const WithImg = (args: any) => <Box><Component {...args}>Button</Component></Box>
|
||||||
|
@ -19,6 +19,7 @@ interface Props {
|
|||||||
block?: boolean
|
block?: boolean
|
||||||
href?: string
|
href?: string
|
||||||
as?: string
|
as?: string
|
||||||
|
mobileBlock?: boolean
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
loading?: boolean
|
loading?: boolean
|
||||||
onClick?: (event: React.MouseEvent<HTMLButtonElement|HTMLAnchorElement, MouseEvent>) => void
|
onClick?: (event: React.MouseEvent<HTMLButtonElement|HTMLAnchorElement, MouseEvent>) => void
|
||||||
@ -57,7 +58,8 @@ export default class Button extends React.Component<Props> {
|
|||||||
[css.block, this.props.block],
|
[css.block, this.props.block],
|
||||||
[css[this.props.size as string], this.props.size],
|
[css[this.props.size as string], this.props.size],
|
||||||
[css.nomargintop, this.props.nomargintop],
|
[css.nomargintop, this.props.nomargintop],
|
||||||
[css.loading, this.props.loading]
|
[css.loading, this.props.loading],
|
||||||
|
[css.mobileBlock, this.props.mobileBlock]
|
||||||
)
|
)
|
||||||
|
|
||||||
if (this.props.href && !this.props.disabled) {
|
if (this.props.href && !this.props.disabled) {
|
||||||
|
@ -115,9 +115,6 @@
|
|||||||
font-size rem(16)
|
font-size rem(16)
|
||||||
transition color $transition
|
transition color $transition
|
||||||
opacity 1
|
opacity 1
|
||||||
// color $darkGrayLight
|
|
||||||
// @media (prefers-color-scheme dark)
|
|
||||||
// color $darkGrayDark
|
|
||||||
|
|
||||||
color black
|
color black
|
||||||
@media (prefers-color-scheme dark)
|
@media (prefers-color-scheme dark)
|
||||||
|
@ -13,10 +13,12 @@
|
|||||||
li
|
li
|
||||||
svg
|
svg
|
||||||
margin-right 8px
|
margin-right 8px
|
||||||
|
vertical-align sub
|
||||||
&:last-child
|
&:last-child
|
||||||
margin 0
|
margin 0
|
||||||
display inline-flex
|
|
||||||
padding 8px
|
padding 8px
|
||||||
|
&.link
|
||||||
|
padding 0
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
margin-bottom 8px
|
margin-bottom 8px
|
||||||
@ -37,3 +39,12 @@
|
|||||||
&:active
|
&:active
|
||||||
background nativeRGB(var(--theme-500))
|
background nativeRGB(var(--theme-500))
|
||||||
color white
|
color white
|
||||||
|
|
||||||
|
.link
|
||||||
|
padding 0
|
||||||
|
.linkInternal
|
||||||
|
padding 8px
|
||||||
|
display inline-block
|
||||||
|
width 100%
|
||||||
|
.icon
|
||||||
|
vertical-align sub
|
||||||
|
@ -10,7 +10,7 @@ export default {
|
|||||||
|
|
||||||
const list: Component['props']['items'] = [
|
const list: Component['props']['items'] = [
|
||||||
{value: 'Menu item 1'},
|
{value: 'Menu item 1'},
|
||||||
{value: 'Menu item 2', icon: XOctagon},
|
{value: 'Menu with link', icon: XOctagon, href: '/'},
|
||||||
{value: 'Menu item 3', icon: XOctagon},
|
{value: 'Menu item 3', icon: XOctagon},
|
||||||
{value: 'Menu item 4', icon: XOctagon},
|
{value: 'Menu item 4', icon: XOctagon},
|
||||||
{value: 'Menu item 5', selected: true, icon: XOctagon},
|
{value: 'Menu item 5', selected: true, icon: XOctagon},
|
||||||
|
@ -29,8 +29,8 @@ export default class Menu extends React.Component<Props> {
|
|||||||
)
|
)
|
||||||
if (item.href) {
|
if (item.href) {
|
||||||
return (
|
return (
|
||||||
<li key={key} className={buildClassName([css.selected, item.selected])}>
|
<li key={key} className={buildClassName([css.selected, item.selected], css.link)}>
|
||||||
<Link noStyle href={item.href}>{content}</Link>
|
<Link noStyle href={item.href} className={css.linkInternal}>{content}</Link>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
top 0
|
top 0
|
||||||
margin 0 !important // sorry :(
|
margin 0 !important // sorry :(
|
||||||
left 0
|
left 0
|
||||||
background nativeRGBA($lightGrayLight, .7)
|
background nativeRGBA(var(--gray-100), .7)
|
||||||
@media (prefers-color-scheme dark)
|
@media (prefers-color-scheme dark)
|
||||||
background nativeRGBA($lightGrayDark, .7)
|
background nativeRGBA(var(--gray-500), .7)
|
||||||
cursor pointer
|
cursor pointer
|
||||||
z-index 200
|
z-index 200
|
||||||
animation fadeIn .3s ease-in-out 1 forwards
|
animation fadeIn .3s ease-in-out 1 forwards
|
||||||
|
@ -167,6 +167,11 @@
|
|||||||
display flex
|
display flex
|
||||||
//max-height 24px
|
//max-height 24px
|
||||||
|
|
||||||
|
&.link
|
||||||
|
padding 0
|
||||||
|
a
|
||||||
|
padding 8px
|
||||||
|
|
||||||
&.active > div
|
&.active > div
|
||||||
color white
|
color white
|
||||||
background nativeRGB(var(--theme-500))
|
background nativeRGB(var(--theme-500))
|
||||||
|
@ -223,11 +223,17 @@ export default class Sidebar extends React.Component<Props, State> {
|
|||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
const isActive = this.state.path === obj.path || obj.subMenu?.find((it) => this.state.path === it.path)
|
const isActive = this.state.path === obj.path || obj.subMenu?.find((it) => this.state.path === it.path)
|
||||||
return <li key={id} className={buildClassName(
|
return <li
|
||||||
[css.active, isActive],
|
key={id}
|
||||||
[css.activeMenu, id === this.state.activeMenu && this.state.open]
|
className={buildClassName(
|
||||||
)}>
|
[css.active, isActive],
|
||||||
<div onClick={isSub ? undefined : this.onClick(id, obj.subMenu)}>
|
[css.activeMenu, id === this.state.activeMenu && this.state.open]
|
||||||
|
)}
|
||||||
|
onClick={isSub ? undefined : this.onClick(id, obj.subMenu)}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={buildClassName([css.link, obj.path])}
|
||||||
|
>
|
||||||
{obj.path ? (
|
{obj.path ? (
|
||||||
<Link noStyle href={obj.path}>
|
<Link noStyle href={obj.path}>
|
||||||
{content}
|
{content}
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
tr:not(:last-child) td
|
tr:not(:last-child) td
|
||||||
border-bottom 1px solid $darkGrayLight
|
border-bottom 1px solid nativeRGB(var(--gray-600))
|
||||||
tr th
|
tr th
|
||||||
border-bottom 2px solid $darkGrayLight
|
border-bottom 2px solid nativeRGB(var(--gray-600))
|
||||||
|
|
||||||
tr td:not(:first-child)
|
tr td:not(:first-child)
|
||||||
tr th:not(:first-child)
|
tr th:not(:first-child)
|
||||||
border-left 1px solid $darkGrayLight
|
border-left 1px solid nativeRGB(var(--gray-600))
|
||||||
|
|
||||||
th
|
th
|
||||||
font-weight bold
|
font-weight bold
|
||||||
|
@ -13,7 +13,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
|
|||||||
{"--" + $name + "-700"}: hextorgb(c700)
|
{"--" + $name + "-700"}: hextorgb(c700)
|
||||||
{"--" + $name + "-800"}: hextorgb(c800)
|
{"--" + $name + "-800"}: hextorgb(c800)
|
||||||
{"--" + $name + "-900"}: hextorgb(c900)
|
{"--" + $name + "-900"}: hextorgb(c900)
|
||||||
{"--" + $name + "-50-text"}: light(c50 ) ? black : white
|
{"--" + $name + "-50-text"}: light(c50) ? black : white
|
||||||
{"--" + $name + "-100-text"}: light(c100) ? black : white
|
{"--" + $name + "-100-text"}: light(c100) ? black : white
|
||||||
{"--" + $name + "-200-text"}: light(c200) ? black : white
|
{"--" + $name + "-200-text"}: light(c200) ? black : white
|
||||||
{"--" + $name + "-300-text"}: light(c300) ? black : white
|
{"--" + $name + "-300-text"}: light(c300) ? black : white
|
||||||
|
@ -4,23 +4,6 @@ nativeRGBA(color, opacity)
|
|||||||
nativeRGB(color)
|
nativeRGB(color)
|
||||||
unquote('rgb(') color unquote(');')
|
unquote('rgb(') color unquote(');')
|
||||||
|
|
||||||
// @deprecated
|
|
||||||
$main = nativeRGB(var(--theme-500))
|
|
||||||
$textOnMain = white
|
|
||||||
|
|
||||||
$backgroundDark = nativeRGB(var(--gray-900))
|
|
||||||
$backgroundLight = nativeRGB(var(--gray-50))
|
|
||||||
$foregroundDark = nativeRGB(var(--gray-800))
|
|
||||||
$foregroundLight = nativeRGB(var(--theme-50))
|
|
||||||
|
|
||||||
// Light theme grays
|
|
||||||
$darkGrayLight = #777
|
|
||||||
$lightGrayLight = #F4F4F4
|
|
||||||
|
|
||||||
// Dark theme grays
|
|
||||||
$darkGrayDark = #444
|
|
||||||
$lightGrayDark = #AAA
|
|
||||||
// -@deprecated
|
|
||||||
|
|
||||||
$transitionTime = .15s
|
$transitionTime = .15s
|
||||||
$transitionFunction = ease-in-out
|
$transitionFunction = ease-in-out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user