Skip to content

Commit

Permalink
Merge pull request #271 from pocke/classname
Browse files Browse the repository at this point in the history
[octicons-react] Add className to the type definition
  • Loading branch information
jonrohan authored Oct 14, 2019
2 parents 2e79233 + 311b1ac commit 006ec94
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 006ec94

Please sign in to comment.