Coder Social home page Coder Social logo

Comments (4)

YanYuanFE avatar YanYuanFE commented on June 15, 2024 1
webStyle={`
                .m-signature-pad canvas {
                  background-image: url('${bg}');
                  background-size: 100% 100%;
                  background-repeat: no-repeat;
                }
                .m-signature-pad {
                  flex: 1;
                  box-shadow: none;
                  border-radius: 10px;
                  height: 600px;
                }
                `}

try set .m-signature-pad height

from react-native-signature-canvas.

YanYuanFE avatar YanYuanFE commented on June 15, 2024

can you provider your code example?

from react-native-signature-canvas.

icaru88 avatar icaru88 commented on June 15, 2024
export const SignatureModal: React.FC<Props> = ({
  description,
  onConfirm,
  onCancel,
  isVisible
}) => {
  const ref = useRef<SignatureViewRef>(null);
  const insets = useSafeAreaInsets();
  const statusBarHeight = insets.top;

  const onSignatureConfirm = (signature: string) => {
    onConfirm(signature);
  };

  const onSignatureClear = () => {
    ref.current?.erase();
  };

  return (
    <Modal
      style={[styles.container]}
      visible={isVisible}
      onRequestClose={onCancel}
    >
      <SafeAreaView
        style={{
          flex: 1,
          marginTop: statusBarHeight
        }}
      >
        <TouchableHighlight style={styles.cancelButton} onPress={onCancel}>
          <Text style={{ color: Theme.colors.white }}>Cancel</Text>
        </TouchableHighlight>
        <SignatureScreen
          ref={ref}
          onOK={onSignatureConfirm}
          onErase={onSignatureClear}
          descriptionText={description}
          backgroundColor={Theme.colors.lightGray}
        />
      </SafeAreaView>
    </Modal>
  );
};

 <SignatureModal
        isVisible={isSignatureModalVisible}
        description={'Please sign in the space above'}
        onConfirm={onSignatureConfirm}
        onCancel={() => setIsSignatureModalVisible(false)}
      />


Simulator Screen Recording - iPhone 15 Pro Max - 2023-11-28 at 20 24 40

from react-native-signature-canvas.

icaru88 avatar icaru88 commented on June 15, 2024

hi thank you so much. It works.

from react-native-signature-canvas.

Related Issues (20)

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.