-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[uma] Remove SDK from private repo (#6780) (#280)
* [uma] Remove SDK from private repo (#6780) GitOrigin-RevId: 232ebc6dbdad88222d5525731c921117a795f748 * feat: add initial typography tokens and typography components GitOrigin-RevId: 8a517bb99f1d4d9799c6803dad003e1d58a9f10c * feat: add ArticleBody component to specify spacings in Article-like contexts GitOrigin-RevId: 191a2458f746e387203a691c474da0bc3954de8b * CI update lock file for PR * [remote-signing-server] Handle actual webhook data (#6645) GitOrigin-RevId: 5426782d6fd6f84f1d1df5868ed1e73aa763b868 * feat: add uma light theme (#6798) GitOrigin-RevId: bedb3b59faa3d1e5a640e67ed5cc03b4b290b904 --------- Co-authored-by: Corey Martin <[email protected]> Co-authored-by: Brian Siao Tick Chong <[email protected]> Co-authored-by: Lightspark Eng <[email protected]>
- Loading branch information
1 parent
b8a3d0e
commit b895794
Showing
34 changed files
with
690 additions
and
2,052 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"use client"; | ||
import styled from "@emotion/styled"; | ||
import { StyledBody } from "./Body"; | ||
import { headlineSelector } from "./Headline"; | ||
|
||
export const Article = styled.article` | ||
${headlineSelector("h1")} { | ||
margin: 0; | ||
padding-bottom: 8px; | ||
} | ||
${headlineSelector("h2")}, ${headlineSelector("h3")}}, ${headlineSelector( | ||
"h4", | ||
)}, ${headlineSelector("h5")}, ${headlineSelector("h6")} { | ||
padding-top: 32px; | ||
padding-bottom: 8px; | ||
margin: 0; | ||
} | ||
${StyledBody} { | ||
margin-top: 8px; | ||
margin-bottom: 8px; | ||
} | ||
img { | ||
margin-top: 16px; | ||
margin-bottom: 16px; | ||
} | ||
`; |
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,30 @@ | ||
"use client"; | ||
|
||
import styled from "@emotion/styled"; | ||
import { App, getTypographyString, TokenSize } from "../typographyTokens"; | ||
|
||
interface Props { | ||
children: React.ReactNode; | ||
app?: App; | ||
size?: TokenSize; | ||
} | ||
|
||
export const Body = ({ | ||
children, | ||
app = App.Lightspark, | ||
size = TokenSize.Medium, | ||
}: Props) => { | ||
return ( | ||
<StyledBody app={app} size={size}> | ||
{children} | ||
</StyledBody> | ||
); | ||
}; | ||
|
||
export const StyledBody = styled.p<Props>` | ||
${({ theme, app, size }) => { | ||
return app && size | ||
? getTypographyString(theme.typography[app].Body[size]) | ||
: ""; | ||
}} | ||
`; |
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,30 @@ | ||
"use client"; | ||
|
||
import styled from "@emotion/styled"; | ||
import { App, getTypographyString, TokenSize } from "../typographyTokens"; | ||
|
||
interface Props { | ||
children: React.ReactNode; | ||
app?: App; | ||
size?: TokenSize; | ||
} | ||
|
||
export const Code = ({ | ||
children, | ||
app = App.Lightspark, | ||
size = TokenSize.Medium, | ||
}: Props) => { | ||
return ( | ||
<CodeStyles app={app} size={size}> | ||
{children} | ||
</CodeStyles> | ||
); | ||
}; | ||
|
||
const CodeStyles = styled.div<Props>` | ||
${({ theme, app, size }) => { | ||
return app && size | ||
? getTypographyString(theme.typography[app].Code[size]) | ||
: ""; | ||
}} | ||
`; |
Oops, something went wrong.