Compare commits
11 Commits
6ee5c44372
...
main
Author | SHA1 | Date | |
---|---|---|---|
a9e3eb8b2c
|
|||
23c82e39ae
|
|||
d6f0f1188e
|
|||
c516617f61
|
|||
fbe32cd26a
|
|||
3e685eaf8d
|
|||
26b4a964ca
|
|||
fb0561e3a2
|
|||
3828128165
|
|||
10419d8efd
|
|||
77761465df
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@intended/intended-ui",
|
||||
"version": "0.1.17",
|
||||
"version": "0.1.26",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@intended/intended-ui",
|
||||
"version": "0.1.17",
|
||||
"version": "0.1.26",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"polished": "^4.1.3",
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"name": "@intended/intended-ui",
|
||||
"description": "Storybook UI library for Intended Link",
|
||||
"license": "MIT",
|
||||
"version": "0.1.17",
|
||||
"version": "0.1.26",
|
||||
"private": false,
|
||||
"main": "dist/index.js",
|
||||
"repository": "https://git.silentsilas.com/Intended/attendant.git",
|
||||
@@ -45,7 +45,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"polished": "^4.1.3",
|
||||
"styled-components": "^5.3.1"
|
||||
"styled-components": "^5.3.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.16.0",
|
||||
@@ -61,8 +63,6 @@
|
||||
"@types/react": "^17.0.21",
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"typescript": "^4.2.0",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-scripts": "4.0.3"
|
||||
},
|
||||
"files": [
|
||||
|
@@ -16,4 +16,10 @@ const Template: ComponentStory<typeof Select> = (args: SelectProps) => (
|
||||
);
|
||||
|
||||
export const Default = Template.bind({});
|
||||
Default.args = { id: "testId" };
|
||||
Default.args = {
|
||||
children: [
|
||||
"<option value='github'>Github</option>",
|
||||
"<option value='facebook'>Facebook</option>"
|
||||
],
|
||||
id: "testId"
|
||||
};
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import React, { FC } from "react";
|
||||
import React, { FC, ReactNode } from "react";
|
||||
import styled from "styled-components";
|
||||
import CSS from "csstype";
|
||||
|
||||
@@ -11,18 +11,17 @@ import {
|
||||
} from "../shared/styles";
|
||||
|
||||
export interface SelectProps {
|
||||
children: ReactNode | null;
|
||||
style?: CSS.Properties;
|
||||
id: string;
|
||||
value?: string;
|
||||
onChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
||||
}
|
||||
|
||||
const Select: FC<SelectProps> = ({ style, id, value = "github", onChange }) => {
|
||||
const Select: FC<SelectProps> = ({ children, style, id, value = "github", onChange }) => {
|
||||
return (
|
||||
<StyledSelect style={style} id={id} value={value} onChange={onChange}>
|
||||
<option value="github">Github</option>
|
||||
<option value="facebook">Facebook</option>
|
||||
<option value="Google">Google</option>
|
||||
{ children }
|
||||
</StyledSelect>
|
||||
);
|
||||
};
|
||||
|
@@ -1,9 +1,13 @@
|
||||
import React from "react";
|
||||
import React, { FC } from "react";
|
||||
import { rgba } from "polished";
|
||||
|
||||
import CSS from "csstype";
|
||||
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 dotColor = "#ffffff";
|
||||
@@ -13,7 +17,7 @@ const SplashIconHeader = () => {
|
||||
const r = "60";
|
||||
|
||||
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} />
|
||||
<svg width="51" height="60" viewBox="0 0 51 60" fill="none" x="35" y="30">
|
||||
<path
|
||||
|
@@ -7,6 +7,7 @@ import { color } from "../../shared/styles";
|
||||
interface CenteredContainerProps {
|
||||
children: ReactNode | null;
|
||||
style?: CSS.Properties;
|
||||
className?: string | undefined;
|
||||
fullscreen?: boolean;
|
||||
wide?: boolean;
|
||||
}
|
||||
@@ -14,11 +15,12 @@ interface CenteredContainerProps {
|
||||
const CenteredContainer: FC<CenteredContainerProps> = ({
|
||||
children,
|
||||
style,
|
||||
className,
|
||||
fullscreen = false,
|
||||
wide = false,
|
||||
}) => {
|
||||
return (
|
||||
<StyledDiv style={style} fullscreen={fullscreen} wide={wide}>
|
||||
<StyledDiv style={style} fullscreen={fullscreen} wide={wide} className={className}>
|
||||
{children}
|
||||
</StyledDiv>
|
||||
);
|
||||
@@ -27,7 +29,7 @@ const CenteredContainer: FC<CenteredContainerProps> = ({
|
||||
export { CenteredContainer };
|
||||
|
||||
const StyledDiv = styled.div<CenteredContainerProps>`
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
|
||||
display: flex;
|
||||
@@ -38,7 +40,7 @@ const StyledDiv = styled.div<CenteredContainerProps>`
|
||||
${(props) =>
|
||||
props.fullscreen &&
|
||||
css`
|
||||
width: 100vw;
|
||||
width: 100%;
|
||||
background: linear-gradient(180deg, #060b2e 0%, #051745 100%);
|
||||
`}
|
||||
|
||||
|
Reference in New Issue
Block a user