Skip to content

Commit aa002ce

Browse files
committed
fix(TextInput): use common Input element for structure
1 parent e32463f commit aa002ce

39 files changed

+560
-210
lines changed

.storybook/blocks/DocsContainer.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ import { SourceContainer } from './SourceContainer';
1616
import { CodeOrSourceMdx, AnchorMdx, HeadersMdx } from './mdx';
1717
import { scrollToElement } from './utils';
1818

19+
import { Subtitle } from './Subtitle';
20+
import { Title } from './Title';
21+
1922
export interface DocsContainerProps {
2023
context: DocsContextProps;
2124
}
@@ -89,6 +92,8 @@ export const DocsContainer: FunctionComponent<DocsContainerProps> = ({
8992
<MDXProvider components={allComponents}>
9093
<DocsWrapper className="sbdocs sbdocs-wrapper">
9194
<DocsContent className="sbdocs sbdocs-content">
95+
<Subtitle />
96+
<Title />
9297
{children}
9398
</DocsContent>
9499
</DocsWrapper>

.storybook/blocks/DocsPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export const DocsPage: FC = (props) => {
4242

4343
return (
4444
<>
45-
<Subtitle />
46-
<Title />
45+
{/*<Subtitle />
46+
<Title />*/}
4747
<Description />
4848
<Primary />
4949
<Props story={PRIMARY_STORY} />

.storybook/preview.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import {
1010
Props,
1111
Stories,
1212
types,
13-
DocsContainer,
13+
//DocsContainer,
1414
} from '@storybook/addon-docs/blocks';
1515
import { DocsPage } from './blocks/DocsPage';
16+
import { DocsContainer } from './blocks/DocsContainer';
1617
import { Subtitle } from './blocks/Subtitle';
1718

1819
import React, { FC } from 'react';

src/components/BannerNavigation/BannerNavigationWithContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ BannerNavigationWithContent.propTypes = {
7676
/**
7777
* The CSS class name to be placed on the wrapping element.
7878
*/
79-
pageWidth: PropTypes.oneOf(pageWidths),
79+
pageWidth: PropTypes.string,
8080
/**
8181
* Allows to disable the search input
8282
*/

src/components/Button/Button.stories.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ on the page.
8484
`;
8585

8686
ButtonKind.story = {
87+
name: 'kind parameter',
8788
parameters: {
8889
docs: {
8990
storyDescription: hello,
@@ -109,6 +110,7 @@ always paired with text whenever possible.
109110
`;
110111

111112
ButtonIcon.story = {
113+
name: 'with icon',
112114
parameters: {
113115
docs: {
114116
storyDescription: helloButtonIcon,
@@ -132,6 +134,7 @@ or less.
132134
`;
133135

134136
Small.story = {
137+
name: 'small Button',
135138
parameters: {
136139
docs: {
137140
storyDescription: helloButtonSmall,

src/components/Checkbox/_checkbox.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
height: rem(18px);
5353
width: rem(18px);
5454
border: $checkbox-border-width solid $ui-05;
55-
border-radius: $button-border-radius;
55+
border-radius: $checkbox-border-radius;
5656
background-color: $ui-01;
5757
}
5858

src/components/Footer/Footer.js

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,50 @@ const Footer = ({
191191
};
192192

193193
Footer.propTypes = {
194+
/**
195+
The content of the footer containing relevant links
196+
*/
194197
children: PropTypes.node,
198+
/**
199+
Additional className which will be added
200+
*/
195201
className: PropTypes.string,
202+
/**
203+
Meta content, usually the copyright notice
204+
*/
205+
metaContent: PropTypes.node,
206+
/**
207+
Optional WFP logo for mobile devices, can be used if the Logo should be provided by the CDN
208+
*/
209+
logo: PropTypes.node,
210+
/**
211+
Optional WFP logo for desktop devices, can be used if the Logo should be provided by the CDN
212+
*/
213+
logoExtended: PropTypes.node,
214+
/**
215+
* The width of the `Wrapper` component
216+
*/
217+
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
218+
/**
219+
The WFP logo
220+
*/
221+
subTitle: PropTypes.node,
222+
/*
196223
labelOne: PropTypes.string,
197224
linkTextOne: PropTypes.string,
198225
linkHrefOne: PropTypes.string,
199226
labelTwo: PropTypes.string,
200227
linkTextTwo: PropTypes.string,
201-
linkHrefTwo: PropTypes.string,
228+
linkHrefTwo: PropTypes.string,*/
202229
};
203230

204-
Footer.defaultProps = {
231+
/*Footer.defaultProps = {
205232
labelOne: 'Need Help?',
206233
linkTextOne: 'Contact',
207234
linkHrefOne: '#',
208235
labelTwo: 'Second Link',
209236
linkTextTwo: 'About',
210237
linkHrefTwo: '#',
211-
};
238+
};*/
212239

213240
export default Footer;
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import React from 'react';
2+
3+
import markdown from './README.mdx';
4+
5+
import Footer from '.';
6+
import Link from '../Link';
7+
8+
export default {
9+
title: 'Components/Footer',
10+
component: Footer,
11+
parameters: {
12+
componentSubtitle: 'Component',
13+
mdx: markdown,
14+
},
15+
};
16+
17+
export const Regular = (args) => (
18+
<Footer {...args}>
19+
<div className="wfp--footer__info">
20+
<div className="wfp--footer__info__item">
21+
<p className="wfp--footer__label">A label</p>
22+
<ul className="wfp--footer__list">
23+
<li>
24+
<Link href="http://www.wfp.org">First Link</Link>
25+
</li>
26+
<li>
27+
<Link href="http://www.wfp.org">Second Link</Link>
28+
</li>
29+
</ul>
30+
</div>
31+
<div className="wfp--footer__info__item">
32+
<p className="wfp--footer__label">Another label</p>
33+
<ul className="wfp--footer__list">
34+
<li>
35+
<Link href="http://www.wfp.org">First Link</Link>
36+
</li>
37+
<li>
38+
<Link href="http://www.wfp.org">Second Link</Link>
39+
</li>
40+
</ul>
41+
</div>
42+
</div>
43+
</Footer>
44+
);
45+
46+
Regular.args = {};
47+
48+
export const External = (args) => (
49+
<Footer
50+
external
51+
metaContent="2019 © World Food Programme"
52+
secondary={
53+
<div>
54+
Via C. G. Viola 68 Parco dei Medici
55+
<br />
56+
00148 Rome, Italy
57+
</div>
58+
}>
59+
<div>
60+
The United Nations World Food Programme - saving lives in emergencies and
61+
changing lives for millions through sustainable development. WFP works in
62+
more than 80 countries around the world, feeding people caught in conflict
63+
and disasters, and laying the foundations for a better future.
64+
<br />
65+
<Link href="http://www.wfp.org">Custom Links</Link>
66+
</div>
67+
</Footer>
68+
);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Footer is the second most important place where your basic site information and links should live. Users turn often to the footer to look for important information, such as contact details, or links to less prominent sections of the website (privacy policy, terms of use, etc).
22

3+
<!--
34
```js
45
import { Footer } from '@wfp/ui';
56
```
@@ -48,3 +49,4 @@ import { Footer } from '@wfp/ui';
4849
| Logo | `Vertical black english Logo from @wfp/icons` | `string` | Footer Logo on Mobile Devices, if not set the default logo from `@wfp/icons` be used. |
4950
| Logo | `Extended black english from @wfp/icons` | `string` | Footer on Desktop Devices, if not set the default logo from `@wfp/icons` be used. |
5051
| metaContent | `undefined` | `string` `component` | Footer meta text |
52+
-->

src/components/Form/_form.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@
6868
//box-shadow: 0 2px 0px 0px $support-01;
6969

7070
~ .#{$prefix}--form-requirement {
71-
max-height: rem(200px);
71+
//max-height: rem(200px);
7272
display: block;
7373
}
7474
}
7575

7676
.#{$prefix}--form-item--invalid {
7777
.#{$prefix}--form-requirement {
78-
max-height: rem(200px);
78+
//max-height: rem(200px);
7979
display: block;
8080
}
8181
}
@@ -90,7 +90,7 @@
9090
@include typescale('omega');
9191
margin: $spacing-2xs 0 0;
9292
max-height: 0;
93-
overflow: hidden;
93+
//overflow: hidden;
9494
font-weight: 600;
9595
line-height: 1.5;
9696
display: none;

0 commit comments

Comments
 (0)