-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34792de
commit dc8304e
Showing
10 changed files
with
133 additions
and
23 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import { Flex, IconButtonLink } from 'gestalt'; | ||
|
||
export default function Example() { | ||
const reactRouterPath = '/iconbuttonlink'; | ||
|
||
return ( | ||
<Flex alignItems="center" height="100%" justifyContent="center" width="100%"> | ||
<IconButtonLink | ||
accessibilityLabel="" | ||
active={reactRouterPath === '/iconbuttonlink' ? 'page' : undefined} | ||
href="https://gestalt.pinterest.systems/web/iconbuttonlink#Active-item" | ||
icon="visit" | ||
onClick={({ event, dangerouslyDisableOnNavigation }) => { | ||
event.preventDefault(); | ||
dangerouslyDisableOnNavigation(); | ||
}} | ||
target="blank" | ||
/> | ||
</Flex> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { Flex, IconButtonLink } from 'gestalt'; | ||
|
||
export default function Example() { | ||
const reactRouterPath = '/iconbuttonlink'; | ||
|
||
return ( | ||
<Flex alignItems="center" height="100%" justifyContent="center" width="100%"> | ||
<IconButtonLink | ||
accessibilityLabel="" | ||
disabled | ||
href="https://gestalt.pinterest.systems/web/iconbuttonlink#Active-item" | ||
icon="visit" | ||
onClick={({ event, dangerouslyDisableOnNavigation }) => { | ||
event.preventDefault(); | ||
dangerouslyDisableOnNavigation(); | ||
}} | ||
target="blank" | ||
/> | ||
<IconButtonLink | ||
accessibilityLabel="" | ||
active={reactRouterPath === '/iconbuttonlink' ? 'page' : undefined} | ||
disabled | ||
href="https://gestalt.pinterest.systems/web/iconbuttonlink#Active-item" | ||
icon="visit" | ||
onClick={({ event, dangerouslyDisableOnNavigation }) => { | ||
event.preventDefault(); | ||
dangerouslyDisableOnNavigation(); | ||
}} | ||
target="blank" | ||
/> | ||
</Flex> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { Flex, IconButtonLink } from 'gestalt'; | ||
|
||
export default function Example() { | ||
return ( | ||
<Flex alignItems="center" height="100%" justifyContent="center" width="100%"> | ||
<IconButtonLink | ||
accessibilityLabel="" | ||
href="https://gestalt.pinterest.systems/web/iconbuttonlink#Active-item" | ||
icon="visit" | ||
onClick={({ event, dangerouslyDisableOnNavigation }) => { | ||
event.preventDefault(); | ||
dangerouslyDisableOnNavigation(); | ||
}} | ||
target="blank" | ||
/> | ||
</Flex> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters