question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Button: unsupported configuration.

See original GitHub issue

🐛 Bug Report

Can not use the prop to style the button. I’m getting the warning like below Button: unsupported configuration. Check one of the following prop values { "appearance": "default", "variants": [ "success", "tiny" ], "states": [] } 📖 Documentation: https://akveo.github.io/react-native-ui-kitten/docs/components/button/api

const renderRhs = () => {
  return (
    <Button size="tiny" appearance="outline" status="success">
      Take control
    </Button>
  );
};

Conversation.navigationOptions = {
  title: 'Conversation',
  header: ({scene}) => {
    const {options} = scene.descriptor;
    const {title} = options;
    return (
      <SafeAreaView>
        <TopNavigation
          title={title}
          alignment="center"
          rightControls={renderRhs()}
        />
      </SafeAreaView>
    );
  },
};

UI Kitten and Eva version

Package Version
@eva-design/eva ^1.3.1
@ui-kitten/components ^4.3.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
addiccommented, Apr 2, 2020

@yckbilly1929 why not just try before asking? 😸 It works

const renderButtonAction = () => (
  <Button appearance='ghost'>
    SAMPLE
  </Button>
);

<TopNavigation rightControls={[renderButtonAction()]} />

@artyorsh Sorry, I am a bit confused, just before that you said:

When using TopNavigation, you should use TopNavigationAction, not Button

So, is it possible to use a Button for the controls? I have tried my code as well as yours and got the same error as the OP.

"@eva-design/eva": "^1.4.0",
"@ui-kitten/components": "^4.4.1",

Error from yours:

Button: unsupported configuration.
Check one of the following prop values {
  "appearance": "default",
  "variants": [
    "primary",
    "medium"
  ],
  "states": []
}
📖 Documentation: https://akveo.github.io/react-native-ui-kitten/docs/components/button/api

@addic you can do like this:

<TopNavigation rightControls={renderRightControls()} />

const renderRightControls = () => <ButtonAction />;

const ButtonAction = (props) => (
    <TopNavigationAction {...props} icon={SomeButton} />
  );

const SomeButton = () => (
    <Button appearance="ghost">Example</Button>
  );

Doesn’t feel the right way, but at least dismiss the warning.

I tried that at first, but the button was nowhere to be found. Now after trying some things out, it seems I needed to set: {width: 'auto', height: 'auto'} for the button to appear.

Cheers.

1reaction
llcernicchiarocommented, Mar 25, 2020

@yckbilly1929 why not just try before asking? 😸 It works

const renderButtonAction = () => (
  <Button appearance='ghost'>
    SAMPLE
  </Button>
);

<TopNavigation rightControls={[renderButtonAction()]} />

@artyorsh Sorry, I am a bit confused, just before that you said:

When using TopNavigation, you should use TopNavigationAction, not Button

So, is it possible to use a Button for the controls? I have tried my code as well as yours and got the same error as the OP.

"@eva-design/eva": "^1.4.0",
"@ui-kitten/components": "^4.4.1",

Error from yours:

Button: unsupported configuration.
Check one of the following prop values {
  "appearance": "default",
  "variants": [
    "primary",
    "medium"
  ],
  "states": []
}
📖 Documentation: https://akveo.github.io/react-native-ui-kitten/docs/components/button/api

@addic you can do like this:

<TopNavigation rightControls={renderRightControls()} />

const renderRightControls = () => <ButtonAction />;

const ButtonAction = (props) => (
    <TopNavigationAction {...props} icon={SomeButton} />
  );

const SomeButton = () => (
    <Button appearance="ghost">Example</Button>
  );

Doesn’t feel the right way, but at least dismiss the warning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unsupported configuration plain style ... - Stack Overflow
go to the navigation item · select the navigation Bar button · just change the bar button item in attribute inspector style -...
Read more >
unknown volume format type qcow2' when adding a new disk ...
Bug 1784304 - [machines] There will be an error which is 'unsupported configuration: unknown volume format type qcow2' when adding a new disk...
Read more >
How to Fix the Unsupported Configuration Error for Android ...
Android Wear Fix Unsupported Configuration Error · Launch the Settings application · Scroll down and tap on the 'Security' option · Toggle the...
Read more >
How to convert Manual(unsupported - Trailhead - Salesforce
Lightning Configuration Converter is a tool that 1/ looks at OnClick JS buttons and converts them to Lightning alternatives. 2/ mass apply ...
Read more >
Troubleshooting DB issues for Amazon RDS Custom
RDS Custom support perimeter and unsupported configurations ... This switch notifies the support perimeter that the agent is running.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found