Skip to content

Commit 006ec94

Browse files
authored
Merge pull request #271 from pocke/classname
[octicons-react] Add className to the type definition
2 parents 2e79233 + 311b1ac commit 006ec94

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

lib/octicons_react/src/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type Size = 'small' | 'medium' | 'large'
66
export interface OcticonProps {
77
ariaLabel?: string
88
children?: React.ReactElement<any>
9+
className?: string
910
height?: number
1011
icon: Icon
1112
size?: number | Size

lib/octicons_react/ts-tests/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ function VerticalAlign() {
4949
)
5050
}
5151

52+
function WithClassName() {
53+
return (
54+
<Octicon icon={Repo} className="awesomeClassName" />
55+
)
56+
}
57+
5258
const CirclesIcon = createIcon(
5359
() => {
5460
return (

0 commit comments

Comments
 (0)