Skip to content

Commit e2ae186

Browse files
committed
refactor storybook demo styles; rebuild storybook files
1 parent 075467c commit e2ae186

File tree

9 files changed

+35
-25
lines changed

9 files changed

+35
-25
lines changed

.storybook/global-style/global-style.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export const GlobalStyle = createGlobalStyle`
1111
html {
1212
line-height: 1.15;
1313
text-size-adjust: 100%;
14+
-moz-text-size-adjust: 100%;
15+
-webkit-text-size-adjust: 100%;
1416
text-rendering: optimizeLegibility;
1517
-moz-osx-font-smoothing: grayscale;
1618
-webkit-font-smoothing: antialiased;
@@ -34,23 +36,26 @@ export const GlobalStyle = createGlobalStyle`
3436
}
3537
3638
em {
39+
color: #191919;
3740
font-weight: 600;
3841
}
3942
4043
strong {
41-
color: black;
44+
color: #191919;
4245
font-weight: 600;
4346
font-size: 1.025em;
4447
}
4548
4649
code {
47-
color: #262626;
50+
color: #191919;
4851
font-size: 88%;
4952
border-radius: 3px;
5053
word-break: break-word;
5154
padding: .15em .2em .15em;
52-
background-color: rgba(30, 167, 253, 0.115);
53-
font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace;
55+
-webkit-font-smoothing: auto;
56+
-moz-osx-font-smoothing: auto;
57+
background-color: rgba(187, 239, 253, 0.325);
58+
font-family: SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;
5459
}
5560
5661
${ReactToastifyCss}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[![npm version](https://img.shields.io/npm/v/react-functional-select.svg?style=flat-square)](https://www.npmjs.com/package/react-functional-select)
1+
[![NPM](https://img.shields.io/npm/v/react-functional-select.svg?style=flat-square)](https://www.npmjs.com/package/react-functional-select)
22
[![npm downloads](https://img.shields.io/npm/dt/react-functional-select.svg?style=flat-square)](https://www.npmjs.com/package/react-functional-select)
33
[![Issues](https://img.shields.io/github/issues/based-ghost/react-functional-select.svg?style=flat-square)](https://github.com/based-ghost/react-functional-select/issues)
4-
[![License](https://img.shields.io/badge/license-mit-red.svg?style=flat-square)](https://www.npmjs.com/package/react-functional-select)
4+
[![License](https://img.shields.io/badge/license-mit-red.svg?style=flat-square)](LICENSE)
55
[![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?style=flat-square)](https://github.com/styled-components/styled-components)
66

77
# react-functional-select

__stories__/helpers/styled/index.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,20 @@ export const Li = styled.li`
134134
`;
135135

136136
export const TextHeader = styled.span`
137-
color: black;
138-
font-weight: 600;
139-
line-height: 1.6;
137+
color: #191919;
138+
line-height: 1.65;
140139
font-size: 1.025em;
140+
border-radius: 3px;
141141
word-break: break-word;
142-
padding: 3px 0 3px 6.4px;
142+
background-color: #eef0f3;
143+
padding: .15em .45em .15em;
144+
-webkit-font-smoothing: auto;
145+
-moz-osx-font-smoothing: auto;
146+
font-family: SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;
143147
144148
${MEDIA_QUERY_IS_MOBILE_XS} {
145-
padding: .1em .25em .1em;
149+
line-height: 1.6;
150+
padding: .1em .4em .1em;
146151
}
147152
`;
148153

__stories__/index.stories.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const SingleSelect = () => {
106106
in the dependency arrays of <code>useCallbacks</code>, <code>useEffects</code>,
107107
and <code>useMemos</code>. When defined in a functional component, wrap in
108108
a <code>useCallback</code>; when defined in a legacy class component, ensure proper
109-
binding to <code>this</code>. Alternatively, if there is no dependency on any state,
109+
binding to <em>this</em>. Alternatively, if there is no dependency on any state,
110110
you can opt to hoist functions outside of the component entirely.
111111
</Paragraph>
112112
<Paragraph>
@@ -201,9 +201,9 @@ export const MultiSelect = () => {
201201
<List>
202202
<Li>
203203
<TextHeader>hideSelectedOptions?: boolean</TextHeader> - Hide the
204-
selected option from the menu. Default value is false, however, if
205-
undefined and <code>isMulti === true</code>, then its value defaults
206-
to true.
204+
selected option from the menu. Default value is <em>false</em>, however,
205+
if undefined and <code>isMulti</code> is <em>true</em>, then its value
206+
defaults to <em>true</em>.
207207
</Li>
208208
<Li>
209209
<TextHeader>closeMenuOnSelect?: boolean</TextHeader> - Close the
@@ -295,7 +295,7 @@ export const Styling = () => {
295295
const [selectedOption, setSelectedOption] = useCallbackState<SelectedOption | null>(null);
296296

297297
const selectWrapperStyle = { marginTop: '1rem' };
298-
const noteStyle = { color: '#262626', fontSize: 'inherit', fontWeight: 700 };
298+
const noteStyle = { fontSize: 'inherit', fontWeight: 700 };
299299
const menuItemSize = selectedOption?.value === ThemeEnum.LARGE_TEXT ? 44 : 35;
300300

301301
const memoizedMarkupNode = useMemo(() => (
@@ -642,15 +642,15 @@ export const Filtering = () => {
642642
<List>
643643
<Li>
644644
<TextHeader>filterIgnoreCase?: boolean</TextHeader> - Filter ignores
645-
case when matching strings. Default value is <code>true</code>.
645+
case when matching strings. Default value is <em>true</em>.
646646
</Li>
647647
<Li>
648648
<TextHeader>filterIgnoreAccents?: boolean</TextHeader> - Filter
649-
ignores accents when matching strings. Default value is <code>false</code>.
649+
ignores accents when matching strings. Default value is <em>false</em>.
650650
</Li>
651651
<Li>
652652
<TextHeader>filterMatchFrom?: 'any' | 'start'</TextHeader> -
653-
Position in source string to perform match. Default value is <code>'any'</code>.
653+
Position in source string to perform match. Default value is <em>'any'</em>.
654654
</Li>
655655
<Li>
656656
<TextHeader>getFilterOptionString(option: MenuOption) {'=>'} string</TextHeader> -
@@ -846,7 +846,7 @@ export const Advanced = () => {
846846
<TextHeader>caretIcon: ReactNode | (...args: any[]) {'=>'} ReactNode</TextHeader> - A custom
847847
node or a function that returns a node can used for the <code>caretIcon</code> property.
848848
When using a function, an object containing stateful data is forwarded and can be used to style
849-
your custom node accordingly. The state is <code>{'{ menuOpen, isLoading, isInvalid, isDisabled }'}</code> of
849+
your custom node accordingly. The state is <em>{'{ menuOpen, isLoading, isInvalid, isDisabled }'}</em> of
850850
type <code>Record{'<'}string, boolean{'>'}</code>. The <code>clearIcon</code> property has an identical definition.
851851
</Li>
852852
</List>

docs/asset-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"files": {
3-
"main.js": "./main.47a09b07.iframe.bundle.js",
3+
"main.js": "./main.e191ace7.iframe.bundle.js",
44
"runtime~main.js": "./runtime~main.f398e60b.iframe.bundle.js",
55
"vendors~main.js": "./vendors~main.31a06b8d.iframe.bundle.js",
66
"vendors~main.js.map": "./vendors~main.31a06b8d.iframe.bundle.js.map",
@@ -10,6 +10,6 @@
1010
"entrypoints": [
1111
"runtime~main.f398e60b.iframe.bundle.js",
1212
"vendors~main.31a06b8d.iframe.bundle.js",
13-
"main.47a09b07.iframe.bundle.js"
13+
"main.e191ace7.iframe.bundle.js"
1414
]
1515
}

docs/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@
130130

131131

132132

133-
window['FRAMEWORK_OPTIONS'] = {"fastRefresh":true};</script><script src="runtime~main.f398e60b.iframe.bundle.js"></script><script src="vendors~main.31a06b8d.iframe.bundle.js"></script><script src="main.47a09b07.iframe.bundle.js"></script></body></html>
133+
window['FRAMEWORK_OPTIONS'] = {"fastRefresh":true};</script><script src="runtime~main.f398e60b.iframe.bundle.js"></script><script src="vendors~main.31a06b8d.iframe.bundle.js"></script><script src="main.e191ace7.iframe.bundle.js"></script></body></html>

docs/main.47a09b07.iframe.bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/main.e191ace7.iframe.bundle.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function scrollTo(el: Element, top: number): void {
3636
* @private
3737
*/
3838
function isDocumentElement(el: Element | Window): boolean {
39-
return el === document.documentElement || el === document.body || el === window;
39+
return el === document.body || el === document.documentElement || el === window;
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)