convert NewUserPage to react
This commit is contained in:
parent
42a593d08a
commit
ccecc4a4b1
10 changed files with 439 additions and 190 deletions
|
@ -0,0 +1,32 @@
|
|||
import React, { FunctionComponent } from 'react';
|
||||
|
||||
const createCheckBoxElement = ({Name, Id}) => ({
|
||||
__html: `<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
is="emby-checkbox"
|
||||
class="chkChannel"
|
||||
data-id="${Id}"
|
||||
/>
|
||||
<span>${Name}</span>
|
||||
</label>`
|
||||
});
|
||||
|
||||
type IProps = {
|
||||
Name?: string;
|
||||
Id?: string;
|
||||
}
|
||||
|
||||
const ChannelAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
||||
return (
|
||||
<div
|
||||
dangerouslySetInnerHTML={createCheckBoxElement({
|
||||
Name: Name,
|
||||
Id: Id
|
||||
})}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default ChannelAccess;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue