This repository has been archived by the owner on Jul 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewite surface, update palette and usage (#178)
- Loading branch information
1 parent
76aab5d
commit dcac5a0
Showing
11 changed files
with
183 additions
and
106 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
import React from 'react'; | ||
import styled, { StyledComponent } from 'styled-components'; | ||
import { Priority } from 'lib/types'; | ||
|
||
const map = (properties: Priority) => ({ | ||
interface SurfaceProps { | ||
weight?: string; | ||
} | ||
|
||
const map = (properties: SurfaceProps & Priority) => ({ | ||
'data-priority': properties.priority || 'secondary', | ||
'data-weight': properties.weight || 'goast', | ||
}); | ||
|
||
export const Surface = styled.div.attrs(map)` | ||
background-color: var(--woly-shape-text-default); | ||
z-index: 1; | ||
width: 100%; | ||
border-radius: var(--woly-rounding); | ||
box-shadow: var(--woly-box-shadow, 3px 3px 8px rgba(11, 31, 53, 0.04)); | ||
` as StyledComponent<'div', Record<string, unknown>, Priority>; | ||
&[data-weight='fill'] { | ||
background-color: var(--woly-shape-default); | ||
border-color: var(--woly-shape-default); | ||
box-shadow: 3px 3px 8px var(--woly-shape-default); | ||
} | ||
&[data-weight='goast'] { | ||
background-color: var(--woly-background); | ||
border-color: var(--woly-background); | ||
box-shadow: 3px 3px 8px var(--woly-shape-text-disabled); | ||
} | ||
` as StyledComponent<'div', Record<string, unknown>, SurfaceProps & Priority>; |
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
Oops, something went wrong.