Skip to content

Commit b2a6ad8

Browse files
authored
Merge pull request #17 from make-software/bugfix/multyselect-dropdown-export
Fix multiselect dropdown and few other improvements
2 parents f9e3d6e + db28936 commit b2a6ad8

14 files changed

Lines changed: 77 additions & 20 deletions

File tree

dist/lib/components/header-text/header-text.d.ts.map

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

dist/lib/components/input/input.d.ts.map

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

dist/lib/theme-config.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,29 @@ export interface ThemeCommonType {
1515
mono: string;
1616
};
1717
fontWeight: {
18+
/**
19+
* 300
20+
*/
1821
light: number;
22+
/**
23+
* 400
24+
*/
1925
regular: number;
26+
/**
27+
* 500
28+
*/
2029
medium: number;
30+
/**
31+
* 600
32+
*/
2133
semiBold: number;
34+
/**
35+
* 700
36+
*/
2237
bold: number;
38+
/**
39+
* 800
40+
*/
2341
extraBold: number;
2442
};
2543
};

dist/lib/theme-config.d.ts.map

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

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@make-software/cspr-design",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "React-based UI component library powering Casper Blockchain applications",
55
"homepage": "https://cspr.design",
66
"repository": "git://github.com/make-software/cspr-design",

src/04-Typography.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ ___
140140
sampleText={SampleText}
141141
fontFamily={typography.type.mono}
142142
/>
143+
<Typeset
144+
fontSizes={[
145+
Number(typography.size.header.sm),
146+
]}
147+
fontWeight={typography.weight.bold}
148+
sampleText={SampleText}
149+
fontFamily={typography.type.mono}
150+
/>
143151

144152
### **Subtitle:**
145153

src/lib/components/dropdown/dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ export function MultiSelectDropdown(props: MultiSelectDropdownProps) {
567567
onRemove(getChangeEvent(selectedItem));
568568
}}
569569
size={14}
570-
src="assets/icons/ic-cross.svg"
570+
src={DeleteIcon}
571571
alt={'Cross icon to clear'}
572572
role={'img'}
573573
/>

src/lib/components/header-text/header-text.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@ export interface HeaderTextProps extends TextProps {
1414
const StyledText = styled(Text)<HeaderTextProps>(
1515
({ theme, size = 2, scale = 'sm', monotype = false }) => ({
1616
fontWeight: monotype
17-
? theme.typography.fontWeight.regular
17+
? matchSize(
18+
{
19+
0: theme.typography.fontWeight.bold,
20+
1: theme.typography.fontWeight.bold,
21+
2: theme.typography.fontWeight.bold,
22+
3: theme.typography.fontWeight.regular,
23+
4: theme.typography.fontWeight.regular,
24+
5: theme.typography.fontWeight.regular,
25+
},
26+
size,
27+
)
1828
: matchSize(
1929
{
2030
0: theme.typography.fontWeight.extraBold,
@@ -24,7 +34,7 @@ const StyledText = styled(Text)<HeaderTextProps>(
2434
4: theme.typography.fontWeight.semiBold,
2535
5: theme.typography.fontWeight.semiBold,
2636
},
27-
size
37+
size,
2838
),
2939
fontSize: matchSize(
3040
{
@@ -35,7 +45,7 @@ const StyledText = styled(Text)<HeaderTextProps>(
3545
sm: '1.75rem',
3646
xs: '1.5rem',
3747
},
38-
scale
48+
scale,
3949
),
4050
lineHeight: matchSize(
4151
{
@@ -46,12 +56,12 @@ const StyledText = styled(Text)<HeaderTextProps>(
4656
sm: '2.5rem',
4757
xs: '1.75rem',
4858
},
49-
scale
59+
scale,
5060
),
5161
'&:where(h1, h2, h3, h4, h5, h6)': {
5262
margin: 0,
5363
},
54-
})
64+
}),
5565
);
5666

5767
export function HeaderText(props: HeaderTextProps) {

src/lib/components/input/input.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { matchSize } from '../../utils/match-size';
44
import { FormField, FormFieldStatus } from '../form-field/form-field';
55
import SvgIcon from '../svg-icon/svg-icon';
66
import { LabelFontSize } from '../../types';
7+
import { ErrorIcon } from '../../icons-index';
78

89
const getThemeColorByError = (error?: boolean) => {
910
if (error == null || !error) {
@@ -179,7 +180,7 @@ export function Input({
179180
};
180181

181182
if (error) {
182-
suffixIcon = <SvgIcon src="assets/icons/ic-error.svg" />;
183+
suffixIcon = <SvgIcon src={ErrorIcon} />;
183184
}
184185

185186
return (

0 commit comments

Comments
 (0)