2020-07-04 08:41:36 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as Strings from "~/common/strings";
|
|
|
|
import * as System from "~/components/system";
|
|
|
|
import * as Constants from "~/common/constants";
|
2020-06-22 14:00:51 +03:00
|
|
|
|
2020-07-04 08:41:36 +03:00
|
|
|
import { css } from "@emotion/react";
|
2020-06-22 14:00:51 +03:00
|
|
|
|
2020-07-04 08:41:36 +03:00
|
|
|
import SystemPage from "~/components/system/SystemPage";
|
|
|
|
import ViewSourceLink from "~/components/system/ViewSourceLink";
|
2020-07-21 03:56:14 +03:00
|
|
|
import CodeBlock from "~/components/system/CodeBlock";
|
2020-06-22 14:00:51 +03:00
|
|
|
|
|
|
|
const STYLES_COLOR_BAR = css`
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 72px 24px 0 0px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_COLOR_TEXT = css`
|
|
|
|
display: block;
|
|
|
|
text-transform: uppercase;
|
|
|
|
letter-spacing: 0.2px;
|
|
|
|
font-size: 12px;
|
|
|
|
padding: 8px;
|
|
|
|
color: ${Constants.system.white};
|
|
|
|
background-color: rgba(0, 0, 0, 0.4);
|
|
|
|
margin-top: 8px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default class SystemPageColors extends React.Component {
|
|
|
|
render() {
|
|
|
|
return (
|
2020-07-04 08:41:36 +03:00
|
|
|
<SystemPage
|
|
|
|
title="SDS: Colors"
|
|
|
|
description="..."
|
2020-07-21 02:48:10 +03:00
|
|
|
url="https://slate.host/system/colors"
|
2020-07-04 08:41:36 +03:00
|
|
|
>
|
2020-06-22 14:15:04 +03:00
|
|
|
<System.H1>
|
2020-07-01 10:31:55 +03:00
|
|
|
Colors <ViewSourceLink file="system/colors.js" />
|
2020-06-22 14:15:04 +03:00
|
|
|
</System.H1>
|
2020-06-22 14:00:51 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-06-22 14:28:14 +03:00
|
|
|
<System.P>All of the colors the Filecoin Client uses.</System.P>
|
2020-06-22 14:00:51 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
|
|
|
<System.H2>Imports</System.H2>
|
2020-06-24 05:02:55 +03:00
|
|
|
<hr />
|
|
|
|
<br />
|
2020-07-04 08:41:36 +03:00
|
|
|
<System.P>Import Constants.</System.P>
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
2020-07-21 03:56:14 +03:00
|
|
|
<CodeBlock>{`import { Constants } from 'slate-react-system';`}</CodeBlock>
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
2020-07-03 19:38:44 +03:00
|
|
|
<br />
|
|
|
|
<System.H2>Usage</System.H2>
|
|
|
|
<hr />
|
|
|
|
<br />
|
|
|
|
<System.P>Declare Constants.</System.P>
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
2020-07-21 03:56:14 +03:00
|
|
|
<CodeBlock>
|
2020-07-01 10:31:55 +03:00
|
|
|
{`{Constants.system.white};
|
2020-06-24 05:02:55 +03:00
|
|
|
|
|
|
|
{Constants.system.foreground};
|
|
|
|
|
|
|
|
{Constants.system.gray};
|
|
|
|
|
|
|
|
{Constants.system.border};
|
|
|
|
|
|
|
|
{Constants.system.darkGray};
|
|
|
|
|
|
|
|
{Constants.system.black};
|
|
|
|
|
|
|
|
{Constants.system.pitchBlack};
|
|
|
|
|
|
|
|
{Constants.system.brand};
|
|
|
|
|
|
|
|
{Constants.system.green};
|
|
|
|
|
|
|
|
{Constants.system.yellow};
|
|
|
|
|
|
|
|
{Constants.system.red};`}
|
2020-07-21 03:56:14 +03:00
|
|
|
</CodeBlock>
|
2020-06-24 05:02:55 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<System.H2>Output</System.H2>
|
|
|
|
<hr />
|
|
|
|
<br />
|
2020-06-22 14:00:51 +03:00
|
|
|
{Object.keys(Constants.system).map((each) => {
|
|
|
|
const hex = Constants.system[each];
|
|
|
|
const rgba = Strings.hexToRGBA(hex);
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
key={each}
|
|
|
|
css={STYLES_COLOR_BAR}
|
|
|
|
style={{
|
|
|
|
backgroundColor: hex,
|
|
|
|
color: Constants.system.black,
|
2020-07-04 08:41:36 +03:00
|
|
|
}}
|
|
|
|
>
|
2020-06-22 14:00:51 +03:00
|
|
|
<span css={STYLES_COLOR_TEXT}>{each.toUpperCase()}</span>
|
|
|
|
<br />
|
|
|
|
<span css={STYLES_COLOR_TEXT}>{hex}</span>
|
|
|
|
<br />
|
|
|
|
<span css={STYLES_COLOR_TEXT}>{rgba}</span>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
})}
|
|
|
|
</SystemPage>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|