Compare commits

..

No commits in common. "fb0561e3a2c1cb8f846ff4d4b96472f884c14944" and "10419d8efdba590a20645135256a98f2af6aed73" have entirely different histories.

4 changed files with 9 additions and 14 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.18",
"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.18",
"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.18",
"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

@ -16,10 +16,4 @@ const Template: ComponentStory<typeof Select> = (args: SelectProps) => (
); );
export const Default = Template.bind({}); export const Default = Template.bind({});
Default.args = { Default.args = { id: "testId" };
children: [
"<option value='github'>Github</option>",
"<option value='facebook'>Facebook</option>"
],
id: "testId"
};

View File

@ -1,4 +1,4 @@
import React, { FC, ReactNode } from "react"; import React, { FC } from "react";
import styled from "styled-components"; import styled from "styled-components";
import CSS from "csstype"; import CSS from "csstype";
@ -11,17 +11,18 @@ import {
} from "../shared/styles"; } from "../shared/styles";
export interface SelectProps { export interface SelectProps {
children: ReactNode | null;
style?: CSS.Properties; style?: CSS.Properties;
id: string; id: string;
value?: string; value?: string;
onChange: (e: React.ChangeEvent<HTMLSelectElement>) => void; onChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
} }
const Select: FC<SelectProps> = ({ children, style, id, value = "github", onChange }) => { const Select: FC<SelectProps> = ({ style, id, value = "github", onChange }) => {
return ( return (
<StyledSelect style={style} id={id} value={value} onChange={onChange}> <StyledSelect style={style} id={id} value={value} onChange={onChange}>
{ children } <option value="github">Github</option>
<option value="facebook">Facebook</option>
<option value="Google">Google</option>
</StyledSelect> </StyledSelect>
); );
}; };