-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiCode][EuiCodeBlock] Reinstate
testenv
mocks (#5464)
* reinstate code testenv mocks * add language data attr * CL
- Loading branch information
1 parent
58b9ca3
commit 42f41f7
Showing
3 changed files
with
56 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
export const EuiCode = ({ | ||
children, | ||
'data-test-subj': dataTestSubj, | ||
language, | ||
}: any) => { | ||
return ( | ||
<code data-test-subj={dataTestSubj} data-code-language={language}> | ||
{children} | ||
</code> | ||
); | ||
}; |
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,32 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
export const EuiCodeBlock = ({ | ||
children, | ||
'data-test-subj': dataTestSubj, | ||
language, | ||
}: any) => { | ||
return ( | ||
<div> | ||
<pre> | ||
<code data-test-subj={dataTestSubj} data-code-language={language}> | ||
{children} | ||
</code> | ||
</pre> | ||
</div> | ||
); | ||
}; | ||
|
||
export const FONT_SIZES: Array<'s' | 'm' | 'l'> = ['s', 'm', 'l']; | ||
export const PADDING_SIZES: Array<'s' | 'm' | 'l' | 'none'> = [ | ||
'none', | ||
's', | ||
'm', | ||
'l', | ||
]; |