0.1.21
This commit is contained in:
parent
3828128165
commit
fb0561e3a2
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@intended/intended-ui",
|
"name": "@intended/intended-ui",
|
||||||
"version": "0.1.19",
|
"version": "0.1.21",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@intended/intended-ui",
|
"name": "@intended/intended-ui",
|
||||||
"version": "0.1.19",
|
"version": "0.1.21",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"polished": "^4.1.3",
|
"polished": "^4.1.3",
|
||||||
|
|
|
@ -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.19",
|
"version": "0.1.21",
|
||||||
"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",
|
||||||
|
|
|
@ -16,4 +16,10 @@ const Template: ComponentStory<typeof Select> = (args: SelectProps) => (
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Default = Template.bind({});
|
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 styled from "styled-components";
|
||||||
import CSS from "csstype";
|
import CSS from "csstype";
|
||||||
|
|
||||||
|
@ -11,18 +11,17 @@ 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> = ({ style, id, value = "github", onChange }) => {
|
const Select: FC<SelectProps> = ({ children, 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}>
|
||||||
<option value="github">Github</option>
|
{ children }
|
||||||
<option value="facebook">Facebook</option>
|
|
||||||
<option value="Google">Google</option>
|
|
||||||
</StyledSelect>
|
</StyledSelect>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue