mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove duplicate components
This commit is contained in:
parent
9db5773cb9
commit
39c742af9d
3 changed files with 54 additions and 60 deletions
|
@ -1,26 +1,28 @@
|
|||
import React, { FunctionComponent } from 'react';
|
||||
|
||||
const createCheckBoxElement = ({Name, Id}) => ({
|
||||
type IProps = {
|
||||
className?: string;
|
||||
Name?: string;
|
||||
Id?: string;
|
||||
}
|
||||
|
||||
const createCheckBoxElement = ({className, Name, Id}) => ({
|
||||
__html: `<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
is="emby-checkbox"
|
||||
class="chkChannel"
|
||||
data-id="${Id}"
|
||||
type="checkbox"
|
||||
is="emby-checkbox"
|
||||
class="${className}"
|
||||
data-id="${Id}"
|
||||
/>
|
||||
<span>${Name}</span>
|
||||
</label>`
|
||||
});
|
||||
|
||||
type IProps = {
|
||||
Name?: string;
|
||||
Id?: string;
|
||||
}
|
||||
|
||||
const NewUserChannelAccessList: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
||||
const CheckBoxListItem: FunctionComponent<IProps> = ({className, Name, Id}: IProps) => {
|
||||
return (
|
||||
<div
|
||||
dangerouslySetInnerHTML={createCheckBoxElement({
|
||||
className: className,
|
||||
Name: Name,
|
||||
Id: Id
|
||||
})}
|
||||
|
@ -28,5 +30,5 @@ const NewUserChannelAccessList: FunctionComponent<IProps> = ({Name, Id}: IProps)
|
|||
);
|
||||
};
|
||||
|
||||
export default NewUserChannelAccessList;
|
||||
export default CheckBoxListItem;
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
import React, { FunctionComponent } from 'react';
|
||||
|
||||
const createCheckBoxElement = ({Name, Id}) => ({
|
||||
__html: `<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
is="emby-checkbox"
|
||||
class="chkFolder"
|
||||
data-id="${Id}"
|
||||
/>
|
||||
<span>${Name}</span>
|
||||
</label>`
|
||||
});
|
||||
|
||||
type IProps = {
|
||||
Name?: string;
|
||||
Id?: string;
|
||||
}
|
||||
|
||||
const NewUserFolderAccessList: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
||||
return (
|
||||
<div
|
||||
dangerouslySetInnerHTML={createCheckBoxElement({
|
||||
Name: Name,
|
||||
Id: Id
|
||||
})}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default NewUserFolderAccessList;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue