mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-07-19 04:05:42 +00:00
28b991d61d
* Add documentation on GH pages * Expand classes for doc generation * Update docs * .nojekyll * Update Identicon.tsx * Update Demo.tsx * Update KeyPair.tsx * Export specific icons * Convert tests to TypeScript
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
|
|
|
import container from './container';
|
|
|
|
describe('container', () => {
|
|
it('applies default styles', () => {
|
|
expect(
|
|
(container(100).style as any)._values
|
|
).toMatchObject({
|
|
'background': 'white',
|
|
'border-radius': '50px',
|
|
'display': 'inline-block',
|
|
'height': '100px',
|
|
'margin': '0px',
|
|
'overflow': 'hidden',
|
|
'padding': '0px',
|
|
'width': '100px'
|
|
});
|
|
});
|
|
|
|
it('overrides with supplied styles', () => {
|
|
expect(
|
|
(container(50, 'black', '', { display: 'block' }).style as any)._values
|
|
).toMatchObject({
|
|
'background': 'black',
|
|
'border-radius': '25px',
|
|
'display': 'block',
|
|
'height': '50px',
|
|
'margin': '0px',
|
|
'overflow': 'hidden',
|
|
'padding': '0px',
|
|
'width': '50px'
|
|
});
|
|
});
|
|
|
|
it('applies the specified className', () => {
|
|
expect(
|
|
container(100, 'blue', 'testClass').className
|
|
).toEqual('testClass');
|
|
});
|
|
});
|