Git Product home page Git Product logo

react-native-adaptivecards's Introduction

DEPRECATION NOTICE

This package is no longer in development.

Please migrate to adaptivecards-reactnative

============================================

Introduction

React Native renderer for AdaptiveCards.

Sample Screenshot

Online renderer and debugging tool can be found here

Getting Started

Basic Usage

  1. Installation
$ npm install react-native-adaptivecards

or by Yarn

$ yarn add react-native-adaptivecards
  1. Implementation
  • Import to the component where you want to show an AdaptiveCards
import AdaptiveCard from 'react-native-adaptivecards';
  • Send initial props
    <AdaptiveCard adaptiveCard={} overrideStyle={} />

Properties

Prop Required Type Description
adaptiveCard Yes object Json object based on AdaptiveCards schema
style No object Customized styles
config No, default{...} object Customized config
onSubmit No function Submit Action
onOpenUrl No function OpenUrl Action
onCallback No function Callback Action
onFocus No function Focus Action
onBlur No function Blur Action
onError No function Error Action
onInfo No function Info Action
onWarning No function Warning Action

Examples

$ cd examples
$ yarn
$ yarn ios

react-native-adaptivecards's People

Contributors

aneureka avatar cslmeyers avatar dongyuzhao avatar faceach avatar suixudongi8 avatar weikanglee avatar zhangyong87524 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-adaptivecards's Issues

Out of sync with NPM published version

The repository's master branch has code that's ahead of what is currently published on NPM. Anyway we can get this to either be reverted, or have the version on NPM be updated to be in sync?

Custom Config for styles

I see no proper documentation provided on how to use this custom config for themes and styles of buttons, etc.

Please help me in understanding how to specify and use a custom config

TextBlock failed to handle wrap and chunk.

Describe the bug
TextBlock failed to handle wrap and chunk.

Expected behavior
If the wrap properties is set to true, TextBlock should wrap the code at any time, otherwise, it should chunk the text and end with ...

Styles should be case insensitive

sampleAdaptiveCard.txt

Please refer to attached text file which contains JSON I am trying out.
this is not working..complete block is not showing up
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "Tell us about yourself"
},

same if I change it to -
{
"type": "TextBlock",
"size": "medium",
"weight": "bolder",
"text": "Tell us about yourself"
},

shows up the text as expected.

The same issue exists with other params as well.
For e.g -"email", "tel", "small", "default".

It should work irrespective of text case. I verified the same JSON with upper case text in https://adaptivecards.io/designer website and everything works perfectly and in react-native it misses out if we use upper case text.

Adaptive Card Version Support

Hi there,

I can't seem to find any documentation on which version of Adaptive Cards this library is supporting. I see there are a lot of new 1.2 features listed at https://adaptivecards.io/explorer/ but obviously not all of these are currently supported by this library. Any guidance where to look for this information?

Support local File with "file" URI scheme

Is your feature request related to a problem? Please describe.
Adaptive Cards can't show local images with "file" URI scheme

Describe the solution you'd like
Whitelist "file" URI scheme

Describe alternatives you've considered

Additional context

Submit button click not call onSubmit method after changing form input

scenario 1:
If I change any Date or Time, then click Submit button. It does not calling obSubmit method.

scenario 2:
But If I doe not change any Date or Time, and directly click Submit button. It call obSubmit method for first time. Second time click submit not call obSubmit method.

Screenshot 2019-06-06 at 4 00 13 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.