Compare commits

..

7 Commits

Author SHA1 Message Date
a9e3eb8b2c add style to splash icon header props and classname to centered container 2022-02-24 01:12:37 -05:00
23c82e39ae 0.1.26 2022-02-24 00:49:19 -05:00
d6f0f1188e 0.1.25 2022-02-24 00:43:25 -05:00
c516617f61 0.1.24 2022-02-24 00:19:45 -05:00
fbe32cd26a 0.1.23 2022-02-24 00:17:12 -05:00
3e685eaf8d 0.1.22 2022-02-24 00:08:47 -05:00
26b4a964ca let splash icon header take in style prop 2022-02-24 00:08:23 -05:00
4 changed files with 16 additions and 10 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@intended/intended-ui", "name": "@intended/intended-ui",
"version": "0.1.21", "version": "0.1.26",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@intended/intended-ui", "name": "@intended/intended-ui",
"version": "0.1.21", "version": "0.1.26",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"polished": "^4.1.3", "polished": "^4.1.3",

View File

@@ -2,7 +2,7 @@
"name": "@intended/intended-ui", "name": "@intended/intended-ui",
"description": "Storybook UI library for Intended Link", "description": "Storybook UI library for Intended Link",
"license": "MIT", "license": "MIT",
"version": "0.1.21", "version": "0.1.26",
"private": false, "private": false,
"main": "dist/index.js", "main": "dist/index.js",
"repository": "https://git.silentsilas.com/Intended/attendant.git", "repository": "https://git.silentsilas.com/Intended/attendant.git",

View File

@@ -1,9 +1,13 @@
import React from "react"; import React, { FC } from "react";
import { rgba } from "polished"; import { rgba } from "polished";
import CSS from "csstype";
import { color, opacity } from "../shared/styles"; import { color, opacity } from "../shared/styles";
const SplashIconHeader = () => { export interface SplashIconHeaderProps {
style?: CSS.Properties;
}
const SplashIconHeader: FC<SplashIconHeaderProps> = ({ style }) => {
const bgCircleColor = rgba(color.white, opacity.light); const bgCircleColor = rgba(color.white, opacity.light);
const dotColor = "#ffffff"; const dotColor = "#ffffff";
@@ -13,7 +17,7 @@ const SplashIconHeader = () => {
const r = "60"; const r = "60";
return ( return (
<svg width="44rem" viewBox="0 0 440 120"> <svg width="44rem" viewBox="0 0 440 120" style={style}>
<circle r={r} cx="60" cy={cy} fill={bgCircleColor} /> <circle r={r} cx="60" cy={cy} fill={bgCircleColor} />
<svg width="51" height="60" viewBox="0 0 51 60" fill="none" x="35" y="30"> <svg width="51" height="60" viewBox="0 0 51 60" fill="none" x="35" y="30">
<path <path

View File

@@ -7,6 +7,7 @@ import { color } from "../../shared/styles";
interface CenteredContainerProps { interface CenteredContainerProps {
children: ReactNode | null; children: ReactNode | null;
style?: CSS.Properties; style?: CSS.Properties;
className?: string | undefined;
fullscreen?: boolean; fullscreen?: boolean;
wide?: boolean; wide?: boolean;
} }
@@ -14,11 +15,12 @@ interface CenteredContainerProps {
const CenteredContainer: FC<CenteredContainerProps> = ({ const CenteredContainer: FC<CenteredContainerProps> = ({
children, children,
style, style,
className,
fullscreen = false, fullscreen = false,
wide = false, wide = false,
}) => { }) => {
return ( return (
<StyledDiv style={style} fullscreen={fullscreen} wide={wide}> <StyledDiv style={style} fullscreen={fullscreen} wide={wide} className={className}>
{children} {children}
</StyledDiv> </StyledDiv>
); );
@@ -27,7 +29,7 @@ const CenteredContainer: FC<CenteredContainerProps> = ({
export { CenteredContainer }; export { CenteredContainer };
const StyledDiv = styled.div<CenteredContainerProps>` const StyledDiv = styled.div<CenteredContainerProps>`
height: 100vh; height: 100%;
text-align: center; text-align: center;
display: flex; display: flex;
@@ -38,7 +40,7 @@ const StyledDiv = styled.div<CenteredContainerProps>`
${(props) => ${(props) =>
props.fullscreen && props.fullscreen &&
css` css`
width: 100vw; width: 100%;
background: linear-gradient(180deg, #060b2e 0%, #051745 100%); background: linear-gradient(180deg, #060b2e 0%, #051745 100%);
`} `}