mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
Style pop up modal
This commit is contained in:
34
src/components/ListItem/ListItem.jsx
Normal file
34
src/components/ListItem/ListItem.jsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import { I18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import {
|
||||
Checkbox,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
export default ({
|
||||
itemId,
|
||||
name,
|
||||
isSelected,
|
||||
onSelect,
|
||||
}) => (
|
||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||
<div className="pf-c-data-list__check">
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
onChange={onSelect}
|
||||
aria-label={i18n._(t`selected ${itemId}`)}
|
||||
id={`selectd-${itemId}`}
|
||||
value={itemId}
|
||||
/>
|
||||
)}
|
||||
</I18n>
|
||||
</div>
|
||||
<div className="pf-c-data-list__cell">
|
||||
<span id="check-action-item1">
|
||||
<b>{name}</b>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
3
src/components/ListItem/index.js
Normal file
3
src/components/ListItem/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import ListItem from './ListItem';
|
||||
|
||||
export default ListItem;
|
||||
Reference in New Issue
Block a user