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",
"version": "0.1.21",
"version": "0.1.18",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@intended/intended-ui",
"version": "0.1.21",
"version": "0.1.18",
"license": "MIT",
"dependencies": {
"polished": "^4.1.3",

View File

@ -2,7 +2,7 @@
"name": "@intended/intended-ui",
"description": "Storybook UI library for Intended Link",
"license": "MIT",
"version": "0.1.21",
"version": "0.1.18",
"private": false,
"main": "dist/index.js",
"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({});
Default.args = {
children: [
"<option value='github'>Github</option>",
"<option value='facebook'>Facebook</option>"
],
id: "testId"
};
Default.args = { 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 CSS from "csstype";
@ -11,17 +11,18 @@ 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> = ({ children, style, id, value = "github", onChange }) => {
const Select: FC<SelectProps> = ({ style, id, value = "github", onChange }) => {
return (
<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>
);
};