-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/theme-creator' into feat/create-theme-page
- Loading branch information
Showing
47 changed files
with
2,386 additions
and
67 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
@use '../../variables.scss'; | ||
|
||
$block: '.#{variables.$ns}color-preview'; | ||
|
||
#{$block} { | ||
--chess: rgb(235, 235, 235); | ||
--surface: rgb(255, 255, 255); | ||
--opacity-pattern: repeating-conic-gradient(var(--chess) 0% 25%, var(--surface) 0% 50%) 50% / | ||
8px 8px; | ||
|
||
width: 16px; | ||
height: 16px; | ||
border-radius: var(--g-border-radius-xs); | ||
overflow: hidden; | ||
position: relative; | ||
|
||
&__color { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
&_with-opacity { | ||
&::before { | ||
content: ''; | ||
display: block; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: var(--opacity-pattern); | ||
} | ||
} | ||
} |
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,22 @@ | ||
import React from 'react'; | ||
|
||
import {block} from '../../utils'; | ||
|
||
import './ColorPreview.scss'; | ||
|
||
export interface ColorPreviewProps { | ||
color?: string; | ||
className?: string; | ||
} | ||
|
||
const b = block('color-preview'); | ||
|
||
const isColorWithOpacity = (color?: string) => !color || color?.startsWith('rgba'); | ||
|
||
export const ColorPreview = ({color, className}: ColorPreviewProps) => { | ||
return ( | ||
<div className={b({'with-opacity': isColorWithOpacity(color)}, className)}> | ||
<div className={b('color')} style={{backgroundColor: color}} /> | ||
</div> | ||
); | ||
}; |
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
Oops, something went wrong.