Skip to content

Commit

Permalink
[octicons-react] Add className to the type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
pocke committed Jan 3, 2019
1 parent 7b5d10a commit 311b1ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/octicons_react/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type Size = 'small' | 'medium' | 'large'
export interface OcticonProps {
ariaLabel?: string
children?: React.ReactElement<any>
className?: string
height?: number
icon: Icon
size?: number | Size
Expand Down
6 changes: 6 additions & 0 deletions lib/octicons_react/ts-tests/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ function VerticalAlign() {
)
}

function WithClassName() {
return (
<Octicon icon={Repo} className="awesomeClassName" />
)
}

const CirclesIcon = createIcon(
() => {
return (
Expand Down

0 comments on commit 311b1ac

Please sign in to comment.