Commit 6f423ba 1 parent 9287100 commit 6f423ba Copy full SHA for 6f423ba
File tree 3 files changed +10
-4
lines changed
packages/orbit-components/src/ButtonMobileStore
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import ButtonMobileStore from "@kiwicom/orbit-components/lib/ButtonMobileStore";
9
9
After adding import into your project you can use it simply like:
10
10
11
11
``` jsx
12
- < ButtonMobileStore type= " appStore" / >
12
+ < ButtonMobileStore alt = " Download on the App Store " type= " appStore" / >
13
13
```
14
14
15
15
## Props
@@ -18,7 +18,7 @@ Table below contains all types of the props available in the ButtonMobileStore c
18
18
19
19
| Name | Type | Default | Description |
20
20
| :-------------- | :------------------------- | :----------- | :---------------------------------------------------------------------------- |
21
- | alt | ` string ` | | Optional property for passing own ` alt ` attribute to the DOM image element. |
21
+ | ** alt** | ` string ` | | Required property for passing ` alt ` attribute to the DOM image element. |
22
22
| title | ` string ` | | Optional property for passing own ` title ` attribute to the DOM image element. |
23
23
| dataTest | ` string ` | | Optional prop for testing purposes. |
24
24
| id | ` string ` | | Set ` id ` for ` ButtonMobileStore ` . |
Original file line number Diff line number Diff line change @@ -11,7 +11,13 @@ describe("ButtonMobileStore", () => {
11
11
it ( "default" , async ( ) => {
12
12
const onClick = jest . fn ( ) ;
13
13
render (
14
- < ButtonMobileStore onClick = { onClick } dataTest = "test" type = { TYPE_OPTIONS . APPSTORE } href = "#" /> ,
14
+ < ButtonMobileStore
15
+ onClick = { onClick }
16
+ dataTest = "test"
17
+ type = { TYPE_OPTIONS . APPSTORE }
18
+ href = "#"
19
+ alt = "Download on the App Store"
20
+ /> ,
15
21
) ;
16
22
expect ( screen . getByTestId ( "test" ) ) . toBeInTheDocument ( ) ;
17
23
const link = screen . getByRole ( "link" ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export interface Props extends Common.Globals {
10
10
readonly type ?: Type ;
11
11
readonly stopPropagation ?: boolean ;
12
12
readonly href ?: string ;
13
- readonly alt ? : string ;
13
+ readonly alt : string ;
14
14
readonly title ?: string ;
15
15
readonly lang ?: string ;
16
16
readonly onClick ?: ( ev : React . MouseEvent < HTMLAnchorElement > ) => void ;
You can’t perform that action at this time.
0 commit comments