-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiCodeBlock] Add line numbers (#4993)
* add line numbers * tests * docs * clean up * CL * text selection in safari * line separator * fix line wrapping * revert me * relative positioning; select * undo docs change * docs updates * docs updates * review; clean up * utils test * update tests
- Loading branch information
1 parent
6d38358
commit 4a4fe51
Showing
10 changed files
with
1,147 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
|
||
import { EuiCodeBlock, EuiSpacer } from '../../../../src/components'; | ||
|
||
export default () => ( | ||
<> | ||
<EuiCodeBlock language="json" fontSize="m" paddingSize="m" lineNumbers> | ||
{`{ | ||
"id": "1", | ||
"rawResponse": { | ||
"took": 19, | ||
"timed_out": false, | ||
"_shards": { | ||
"total": 1, | ||
"successful": 1, | ||
"skipped": 0, | ||
"failed": 0 | ||
} | ||
} | ||
}`} | ||
</EuiCodeBlock> | ||
|
||
<EuiSpacer /> | ||
|
||
<EuiCodeBlock | ||
language="json" | ||
fontSize="m" | ||
paddingSize="m" | ||
lineNumbers={{ start: 32 }} | ||
> | ||
{`"OriginLocation": [ | ||
{ | ||
"coordinates": [ | ||
-97.43309784, | ||
37.64989853 | ||
], | ||
"type": "Point" | ||
} | ||
],`} | ||
</EuiCodeBlock> | ||
</> | ||
); |
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
Oops, something went wrong.