mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-19 04:04:22 -05:00
[WebUI] Even off JSX string props
Increased consistency and readability by replacing any unnecessary JSX expressions in places where string literals are sufficient
This commit is contained in:
committed by
psychedelicious
parent
99f4417cd7
commit
e46102124e
@@ -23,8 +23,8 @@ export default function InvokeAccordionItem(props: InvokeAccordionItemProps) {
|
||||
return (
|
||||
<AccordionItem className="advanced-parameters-item">
|
||||
<AccordionButton className="advanced-parameters-header">
|
||||
<Flex width={'100%'} gap={'0.5rem'} align={'center'}>
|
||||
<Box flexGrow={1} textAlign={'left'}>
|
||||
<Flex width="100%" gap="0.5rem" align="center">
|
||||
<Box flexGrow={1} textAlign="left">
|
||||
{header}
|
||||
</Box>
|
||||
{additionalHeaderComponents}
|
||||
|
||||
@@ -63,7 +63,7 @@ const FaceRestoreSettings = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Flex direction={'column'} gap={2}>
|
||||
<Flex direction="column" gap={2}>
|
||||
<IAISelect
|
||||
label={t('parameters:type')}
|
||||
validValues={FACETOOL_TYPES.concat()}
|
||||
|
||||
@@ -36,7 +36,7 @@ export default function ImageToImageStrength(props: ImageToImageStrengthProps) {
|
||||
styleClass={styleClass}
|
||||
withInput
|
||||
withSliderMarks
|
||||
inputWidth={'5.5rem'}
|
||||
inputWidth="5.5rem"
|
||||
withReset
|
||||
handleReset={handleImg2ImgStrengthReset}
|
||||
/>
|
||||
|
||||
@@ -49,7 +49,7 @@ const HiresStrength = () => {
|
||||
isInteger={false}
|
||||
withInput
|
||||
withSliderMarks
|
||||
inputWidth={'5.5rem'}
|
||||
inputWidth="5.5rem"
|
||||
withReset
|
||||
handleReset={handleHiResStrengthReset}
|
||||
isSliderDisabled={!hiresFix}
|
||||
@@ -75,10 +75,10 @@ const HiresSettings = () => {
|
||||
dispatch(setHiresFix(e.target.checked));
|
||||
|
||||
return (
|
||||
<Flex gap={2} direction={'column'}>
|
||||
<Flex gap={2} direction="column">
|
||||
<IAISwitch
|
||||
label={t('parameters:hiresOptim')}
|
||||
fontSize={'md'}
|
||||
fontSize="md"
|
||||
isChecked={hiresFix}
|
||||
onChange={handleChangeHiresFix}
|
||||
/>
|
||||
|
||||
@@ -3,7 +3,7 @@ import SeamlessSettings from './SeamlessSettings';
|
||||
|
||||
const ImageToImageOutputSettings = () => {
|
||||
return (
|
||||
<Flex gap={2} direction={'column'}>
|
||||
<Flex gap={2} direction="column">
|
||||
<SeamlessSettings />
|
||||
</Flex>
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ import SeamlessSettings from './SeamlessSettings';
|
||||
|
||||
const OutputSettings = () => {
|
||||
return (
|
||||
<Flex gap={2} direction={'column'}>
|
||||
<Flex gap={2} direction="column">
|
||||
<SeamlessSettings />
|
||||
<HiresSettings />
|
||||
</Flex>
|
||||
|
||||
@@ -22,10 +22,10 @@ const SeamlessSettings = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Flex gap={2} direction={'column'}>
|
||||
<Flex gap={2} direction="column">
|
||||
<IAISwitch
|
||||
label={t('parameters:seamlessTiling')}
|
||||
fontSize={'md'}
|
||||
fontSize="md"
|
||||
isChecked={seamless}
|
||||
onChange={handleChangeSeamless}
|
||||
/>
|
||||
|
||||
@@ -10,7 +10,7 @@ import Threshold from './Threshold';
|
||||
*/
|
||||
const SeedSettings = () => {
|
||||
return (
|
||||
<Flex gap={2} direction={'column'}>
|
||||
<Flex gap={2} direction="column">
|
||||
<RandomizeSeed />
|
||||
<Flex gap={2}>
|
||||
<Seed />
|
||||
|
||||
@@ -18,7 +18,7 @@ export default function ShuffleSeed() {
|
||||
|
||||
return (
|
||||
<Button
|
||||
size={'sm'}
|
||||
size="sm"
|
||||
isDisabled={shouldRandomizeSeed}
|
||||
onClick={handleClickRandomizeSeed}
|
||||
padding="0 1.5rem"
|
||||
|
||||
@@ -18,7 +18,7 @@ export default function GenerateVariationsToggle() {
|
||||
return (
|
||||
<IAISwitch
|
||||
isChecked={shouldGenerateVariations}
|
||||
width={'auto'}
|
||||
width="auto"
|
||||
onChange={handleChangeShouldGenerateVariations}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -7,7 +7,7 @@ import VariationAmount from './VariationAmount';
|
||||
*/
|
||||
const VariationsSettings = () => {
|
||||
return (
|
||||
<Flex gap={2} direction={'column'}>
|
||||
<Flex gap={2} direction="column">
|
||||
<VariationAmount />
|
||||
<SeedWeights />
|
||||
</Flex>
|
||||
|
||||
@@ -71,7 +71,7 @@ const PromptInput = () => {
|
||||
id="prompt"
|
||||
name="prompt"
|
||||
placeholder={t('parameters:promptPlaceholder')}
|
||||
size={'lg'}
|
||||
size="lg"
|
||||
value={prompt}
|
||||
onChange={handleChangePrompt}
|
||||
onKeyDown={handleKeyDown}
|
||||
|
||||
Reference in New Issue
Block a user